Open Bug 1768147 Opened 2 years ago Updated 1 year ago

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)

defect

Tracking

()

Tracking Status
firefox102 --- affected

People

(Reporter: henry-x, Unassigned)

References

Details

(Keywords: rtl)

Attachments

(1 file)

Steps to reproduce:

  1. Open a right-to-left document with a focusable element.
  2. Tab to focus the element.
  3. 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.

Must be annoying bug for RTL language users, but the symptom is not so serious, so setting normal priority and severity.

Severity: -- → S3
Component: DOM: Events → DOM: UI Events & Focus Handling
Priority: -- → P3
Keywords: rtl
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: