Proposed investigation: right-click links in canvases #41
KaliedaRik
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently we can create an entity with an anchor attribute which, with a little additional boilerplate to pass events down to the entity, will allow navigation via mouse/touch click and keyboard tab/enter strokes. Existing code respects browser-specific additional keys (shift, ctrl, alt, etc) during the click so the navigation will occur with results that user would expect when using that browser (eg: open in new tab, window, etc)
However current functionality does not support right-click mouse events which generate a contextmenu event. At the moment the right click will trigger on the canvas element (by default) and display the image-related context menu, whereas what we would like the UI to display is the link-related context menu. Additionally, the system stores no information that a contextmenu event is underway so even if the user selects an item from the menu the resulting mouseup/etc event will trigger and be captured/passed-down in the normal way (if coded for).
See: https://developer.mozilla.org/en-US/docs/Web/API/Element/contextmenu_event
vs
A separate edge case is a drag event on a navigation entity with associated anchor - expected usage would be for the link url to be copied (where?) so that it can be applied/pasted when the drag event ends eg: dragging a link to the browser address bar to open the link in a new tab. This use case feels a lot more complex so is out of scope for this work.
Beta Was this translation helpful? Give feedback.
All reactions