contextmenu MouseEvent triggered by a ContextMenu key press uses bottom left corner in right-to-left (RTL)
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox102 | --- | affected |
People
(Reporter: henry-x, Unassigned)
References
Details
(Keywords: rtl)
Attachments
(1 file)
17.12 KB,
image/png
|
Details |
Steps to reproduce:
- Open a right-to-left document with a focusable element.
- Tab to focus the element.
- Press the "ContextMenu" key (https://en.wikipedia.org/wiki/Menu_key).
Result
The context menu opens with the top right corner touching the bottom left corner of the focused element. As such, the context menu is not below the focused element. See the attachment.
Expect
The context menu opens with the top right corner touching the bottom right corner of the focused element. I.e. the reverse of the left-to-right display so that the context menu appears below the focused element.
I think the problem is that the "contextmenu" MouseEvent
has its clientX/screenX always set using the bottom left of the focused element, without taking the direction of the element into account. I think it is set here https://searchfox.org/mozilla-central/rev/408eac3ccaea2d35b00706925d4d944803e19aba/layout/base/PresShell.cpp#8839 but I'm not sure.
Comment 1•2 years ago
|
||
It's https://searchfox.org/mozilla-central/rev/408eac3ccaea2d35b00706925d4d944803e19aba/layout/base/PresShell.cpp#9153. That probably needs a + width
.
Must be annoying bug for RTL language users, but the symptom is not so serious, so setting normal priority and severity.
Description
•