Context menu is always shown in the top left when activated from keyboard
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox58 | --- | wontfix |
| firefox59 | --- | fix-optional |
People
(Reporter: 5silentrain, Unassigned, Mentored)
References
Details
(Keywords: good-first-bug, reproducible)
| Reporter | ||
Comment 1•7 years ago
|
||
Updated•7 years ago
|
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
Comment 4•7 years ago
|
||
Comment 5•7 years ago
|
||
Comment 6•7 years ago
|
||
| Reporter | ||
Comment 7•7 years ago
|
||
Comment 8•7 years ago
|
||
Comment 9•7 years ago
|
||
Comment 10•7 years ago
|
||
Comment 11•7 years ago
|
||
Comment 12•7 years ago
|
||
Comment 14•7 years ago
|
||
Comment 15•7 years ago
|
||
Comment 16•7 years ago
|
||
| Assignee | ||
Updated•6 years ago
|
Comment 17•4 years ago
|
||
This good-first-bug hasn't had any activity for 6 months, it is automatically unassigned.
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Comment 18•2 years ago
|
||
I think, position of context menu is a consequence, the cause is incorrect target of contextmenu events. Execute in a web page console
window.addEventListener(
"contextmenu",
e => console.log("contextmenu target: %o", e.target),
{ capture: true })
and try right mouse click or [Menu]/[Shift+F10] after search ([Ctrl+F] or /) or when caret browsing is enabled. For keyboard navigation Firefox-113 reports <body>. Chromium-113 provides precise event target element after search, but <html> after moving keyboard caret within non-interactive text.
My primary interest is getting context menu target element in an add-on (see Bug #1835211), but, I am afraid, the feature depends on implementation in web engine.
| Reporter | ||
Comment 19•2 years ago
|
||
I currently have a Mac mini and am using macOS. I use the Apple keyboard, that is, "Apple Magic Keyboard with Touch ID and Numeric Keypad". In this system, I did not find the ability to call the context menu using the keyboard 🤔
Comment 20•2 years ago
|
||
I have not found a way to invoke from keyboard a context menu for an image with specific entries. E.g. libreoffice has [Shift+F4] shortcut to select an image.
Despite contextmenu event is fired with <body> target, there are ways to obtain actual DOM element, e.g. document.elementFromPoint and elementsFromPoint:
window.addEventListener(
"contextmenu",
e => console.log("contextmenu: %o", document.elementsFromPoint(e.x, e.y)),
{ capture: true })
window.getSelection().focusNode is another way. For caret browsing selection is collapsed and has type: "Caret". It is applicable to the current search position as well, however selection has type: "Range". Of course heuristics that the caret is adjacent to an image requires more code.
P.S. I am not familiar with macOS, but perhaps context menu from keyboard is a subject of a dedicated feature request. My impression based on search engine results that it is not a native feature, however some applications implement it.
Updated•6 months ago
|
| Reporter | ||
Comment 21•6 months ago
|
||
The same thing happens in macOS version 15, called Sequoia, when you press Ctrl+Enter.
Description
•