-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Popup] Light dismissal triggers for popup when used for context menu #426
Comments
Good insights? What is your goal for next steps for these insights? It seems that you're beginning to lean towards a new event or content attribute? If so; where/how are you wanting to incubate these as these won't easily transfer to popup itself IMO. |
So this one, I think, is (attempted to be) captured by the existing explainer. This section says that "click outside" should be a light dismiss trigger for
This is an interesting one. This issue talks about whether scrolling should be a light dismiss trigger, and my reading is that the general direction seems to be "no". Your use case of a context menu replacement is interesting though. This seems to be platform dependent - at least on my Mac in Chrome, when there's an active (native browser) context menu, scrolling is completely blocked. So no dismiss-on-scroll, but also, no-scroll. |
I recently updated the explainer to more-concretely flesh out what "light dismiss" means. I believe that based on that definition, and assuming #529 results in no changes, both of your conditions should be supported as-is. Basically, a |
Sorry I should have been more specific. When I was talking about dragstart this is the html drag and drop api dragstart event. The slightly tricky bit is that the thing that will be "dragged" is the trigger for the contextmenu popup. E.g. imagine you have That said, the current design is that the dragstart will happen first, but when you move your finger suffiicently far we plan to dispatch a new type of event: w3c/uievents#309 so as long as this new event being dispatched to the triggering element counts as a light dismiss we'll be good. |
Right, I understood that we're talking about
Based on the above, you therefore think a I believe your logic is sound, and I don't see any issues with adding such a trigger. One peripheral thing is that a popup triggered by an invoking attribute (e.g. I think this makes sense. If the above sounds right, I'm inclined to just add this to the explainer and prototype as an implementation detail, and avoid spending OpenUI meeting time for a resolution. Make sense? |
See the discussion at [1] for more context, but this handles the mobile contextmenu case. [1] openui/open-ui#426 (comment) Bug: 1307772 Change-Id: I32e5440c3560cf93b054ff32eb87a79c021cca15
See the discussion at [1] for more context, but this handles the mobile contextmenu case. [1] openui/open-ui#426 (comment) Bug: 1307772 Change-Id: I32e5440c3560cf93b054ff32eb87a79c021cca15
See the discussion at [1] for more context, but this handles the mobile contextmenu case. [1] openui/open-ui#426 (comment) Bug: 1307772 Change-Id: I32e5440c3560cf93b054ff32eb87a79c021cca15
See the discussion at [1] for more context, but this handles the mobile contextmenu case. [1] openui/open-ui#426 (comment) Bug: 1307772 Change-Id: I32e5440c3560cf93b054ff32eb87a79c021cca15
See the discussion at [1] for more context, but this handles the mobile contextmenu case. [1] openui/open-ui#426 (comment) Bug: 1307772 Change-Id: I32e5440c3560cf93b054ff32eb87a79c021cca15
So w3c/uievents#309 discusses adding a new |
One of the use cases popups are well suited for is for context menus. From the light dismissal behaviours there may be a couple dismissal cases missing which I'm hoping we can add:
If we have light dismissal in these two cases I think that a popup used for a custom context menus should just work, e.g.
<div oncontextmenu="popup.show()">
or perhaps we could even support<div contextmenu="popup-id">
.The text was updated successfully, but these errors were encountered: