Comments (4)
I'm not really sure if another event or better documentation is the right approach here, but it was tricky to figure this out, and I'm curious how this would work for manually triggered overlays as well.
from spectrum-web-components.
As I think about this more, I think what I'm really asking for is an event that doesn't bubble. I just want to know if this overlay opened or closed. Using the same (bubbling) event that the overlay system gets confusing because it's less common, and surprising when you run into it.
So ideally there's be another event that doesn't bubble, which when documented should make the difference in behavior very clear. And all that said, I won't be too offended if you decide it's just simpler to improve the documentation. Just pointing out that this can be a real surprising gotcha.
from spectrum-web-components.
Some quick documentation points:
- managing the events in the merged DOM tree https://opensource.adobe.com/spectrum-web-components/migrations/2023-8-18/#prepare-for-descendant-overlays-to-exist-in-the-same-dom-tree
- the
overlay
property on these eventsThe section before this (βEventsβ is a section twice π€¦ββοΈ) https://opensource.adobe.com/spectrum-web-components/components/overlay/#when-it-is-%22fully%22-open-or-closed%3Ftype OverlayStateEvent = Event & { overlay: Overlay; };
- there are also some native-like events available: https://developer.mozilla.org/en-US/docs/Web/API/Popover_API#events
from spectrum-web-components.
@adixon-adobe Does the above comment from Westbrook give you a path forward?
from spectrum-web-components.
Related Issues (20)
- [Feat]: Truncated should reflect dynamic text updates
- Duplicate Variable Entries in global-vars.css
- [Docs]: axe-devtools color contrast a11y reports
- [Bug]: Combobox unsynced animations HOT 1
- [docs]: Storybook demo in documentation site should be scalable
- [Bug]: Screen Readers doesnt pick up `sp-progressbar` HOT 2
- [Bug]: indeterminate state for `sp-swatch` shows an "Elements must only use supported ARIA attributes" error
- [Bug]: Menu item focus state in overlay when using keyboard in Safari has visual issues
- [Bug]: `sp-number-field` cannot be styled using `--mod-*` variables
- [Bug]: sp-overlay needs 2 clicks to close on Windows with notImmediatelyClosable set
- [Bug]: Inconsistent behavior of sp-number-field in Safari on iOS
- [Bug]: Arrow keys don't work on Picker and Action-Menu if its opened by a mouse click.
- [Feat]: Add pendingStateController
- Installation problems
- [Bug]: Modal overlays close unexpectedly when another overlay is added and when they're not an ancestor of a click event
- [Bug][A11y]: Action-Menu menu items doesnt read in screen-readers HOT 2
- [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
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.