Comments (3)
I'm surprised that without a Menu Item that this code is finding a trigger
. Can you share what the trigger is so we can understand how it is both el.getAttribute('role') === this.childRole
and el.menuData === undefined
?
from spectrum-web-components.
handlePointerBasedSelection(event) {
const path = event.composedPath();
const target = path.find((el) => {
if (!(el instanceof Element)) {
return false;
}
console.log("MENU SWC: ", el);
return el.getAttribute("role") === this.childRole;
});
prints out:
<li class="spectrum-Menu-item" tabindex="0" role="menuitem"><span class="spectrum-Menu-itemLabel"><span>Edit version info</span></span></li>
and leads to:
TypeError: Cannot read properties of undefined (reading 'selectionRoot')
at Menu.handlePointerBasedSelection (chunk-SCU35XXF.js?v=c2a8ef54:347:59)
at Menu.handlePointerup (chunk-SCU35XXF.js?v=c2a8ef54:321:10)
at Menu.nrWrapper (chunk-DTJESBZO.js?v=c2a8ef54:71:21)
from spectrum-web-components.
We can add this, but we should make sure we add tests for this case.
from spectrum-web-components.
Related Issues (20)
- [Bug]: Keyboard navigation of menu items doesn't start with the first item HOT 1
- [Feat]: Fill-start in slider should respect 0-values as well as normalization function
- [Bug]: overlay-trigger with slotted buttons in dialog doesn't not trap focus
- [Feat]: Add CSS custom property to set the `max-height` of the `sp-picker` popover HOT 1
- [Bug]: sp-tray retracts automatically when opened with less items in iOS simulator HOT 4
- [Bug]: Action-button with href cannot be activated by screen reader
- [Bug]: sp-table-checkbox-cell must be able to accept the aria-label and pass it on to sp-checkbox
- [Bug]: `change` event is not triggered for double byte characters on Safari
- [Feat]: Add support to display shortcut key in the action button
- [Bug]: Sp-slider lacks 3:1 contrast ratio between foreground and background
- [Bug]: TextField border should have 3:1 minimum contrast ratio
- [Bug]: Add ability to overlay-wrap toast content with long words
- [Feat]: Option to hide default password reveal icon on edge browser for sp-textfield
- [Bug]: Initial Focus Issue with Tabs Component in Spectrum Web Components HOT 4
- [Bug]: Using ENTER on an action-menu will break its @click handling if focus is moved HOT 2
- [Bug]: sp-menu-group causes nested menus when no selection
- [Bug]: Documentation Mobile RTL Settings panel is off-screen
- [Bug]: When pressing the Enter button in a textbox, the option should be unselected and the corresponding value should be updated.
- [Bug]: Rendering issue with sp-grid and sp-card:
- [Bug]: Click handlers on the menu-items inside of the menu do not fire correctly in IOS devices. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spectrum-web-components.