Comments (3)
In theory, if we change:
const activeEl = this.shadowRoot.querySelector(
`#${this.activeDescendant?.value}`
) as HTMLElement;
to
const activeEl = this.shadowRoot.getElementById(
this.activeDescendant?.value
) as HTMLElement;
This would no longer throw and no practical changes would be needed in the template?
from spectrum-web-components.
There's the edge case where it tries to get an activeDescendant
that doesn't exist, but I'm not sure how practical actually hitting the code path is...
from spectrum-web-components.
getElementById
works too (even with whitespaces, which is another edge).
Another thing I noticed here is that when I select an option using the keyboard, the change
event is not triggered.
from spectrum-web-components.
Related Issues (20)
- [Bug]: sp-picker-button quiet styles need to be updated
- [Bug]: ActionMenu items cannot be navigated or selected via Keyboard when MenuItems are inside a MenuGroup HOT 2
- [Bug]: MenuGroup selects="multiple" throws an error when used inside ActionMenu HOT 3
- [Feat]: Support `pending` state for Combobox
- [Bug]: Clicking on a slider track in a popover shouldn't close the popover
- [Bug]: Checkbox and Overlay are missing lit dependencies in 0.42.3 release HOT 1
- [Bug]: Slider values are truncated and divided by 1000 - when using values > 1000 HOT 3
- [Bug]: `@swc-react/combobox` is not publishing TS definitions HOT 1
- [Bug]: Firefox: Text in Textfield cannot be selected by mouse HOT 2
- [Bug]: Coachmark and Overlay are missing lit dependencies in 0.42.4 release HOT 1
- [Bug]: TypeError: Cannot read properties of undefined (reading 'selectionRoot') in Menu.handlePointerBasedSelection HOT 3
- [Bug]: Multiple change events dispatched from ActionMenu tray in mobile device HOT 2
- [Bug]: No tray behavior with sp-action-menu on Android HOT 4
- [Bug]: (iOS) sp-card (supplied with an actions slot) action menu opens tray and on menu item selection in tray, if other card is behind it registers click on it as well. HOT 2
- [Bug]: dialog examples not working on IOS 15.0 (simulator) HOT 1
- [Bug][MOBILE]: docs site theme manager picker values are not changing sp-theme properties
- [Bug]: sp-table-head-cell with sortable cannot be activated by keyboard
- [Bug]: Tooltip does not appear on keyboard focus HOT 1
- [Bug]: Slider and Numberfield don't respect different locale with fractional steps 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.