spectrum-web-components icon indicating copy to clipboard operation
spectrum-web-components copied to clipboard

[Feat]: Overlay, manage "clicks" that do not effect the stack.

Open Westbrook opened this issue 4 years ago • 1 comments

Code of conduct

  • [X] I agree to follow this project's code of conduct.

Impacted component(s)

Overlay

Description of the requested feature

In some cases there may be reason to allow for clicks on the page not to effect the overlay stack, for instance when placing synthetic <input type="file" /> elements out of bound of overlays where upload interactions are starting due to those overlays being owned by other elements/teams. An escape hatch should be surfaced that would allow those clicks to be ignored without having to do something like: https://webcomponents.dev/edit/aEh5DWhJDDXuCnyOlD4Z/src/index.ts

Mockups or screenshots

No response

Implementation notes or ideas

Simplest, though maybe weakest stability, approach to this would be to document a class or attribute that removed a target element from the processing done in the overlay stack.

Overlay could surface a ignoreElement() API where we registered elements.

Overlay could surface a root API such that events outside of the root weren't listened to.

Thoughts?

Westbrook avatar Oct 20 '21 20:10 Westbrook

cc: @joekukish and @dsadhanala

Westbrook avatar Oct 20 '21 20:10 Westbrook

Needs investigation inside a <dialog> or [popup] context.

  • How does the browser handle this?
  • Does that delivery reduce the likelihood of this consumption pattern arising?
  • look more closely at the well known selector approach.

Westbrook avatar Oct 10 '22 17:10 Westbrook