Closed Bug 583411 Opened 14 years ago Closed 14 years ago

Context menu key events are generated with the wrong target

Categories

(Core :: Widget: Win32, defect)

x86_64
Windows Server 2008
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: neil, Assigned: neil)

Details

Attachments

(3 files)

When I try to open the context menu with the keyboard, it probably does not open, or if it does, it has the wrong context. This is because it fires with the document as its target. The popup manager then copies the incorrect target to document.popupNode. Instead the focused node should be the event target.

I tried in a build from a week ago and the event target when canvas has focus is actually the HTMLHtmlElement, so even then it's not the document.
Turns out I was running an x86_64 build by mistake, which has a bug. Morphing.
Component: DOM: Events → Widget: Win32
Keywords: regression
OS: Windows XP → Windows Server 2008
QA Contact: events → win32
Hardware: x86 → x86_64
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #461870 - Flags: review?(jmathies)
Attached patch Possible patchSplinter Review
This "corrects" our cheat to correctly test all four bytes at once.
Attachment #461872 - Flags: review?(jmathies)
Attached patch Proposed patchSplinter Review
Since Windows actually passes -1, just test for -1...
Attachment #461873 - Flags: review?(jmathies)
I'm a fan of the literal MSDN interpretation, but proposed wfm as well.
Attachment #461870 - Flags: review?(jmathies) → review+
Attachment #461872 - Flags: review?(jmathies) → review-
Attachment #461873 - Flags: review?(jmathies) → review+
Comment on attachment 461873 [details] [diff] [review]
Proposed patch

Seeking approval for a trivial Win64 correctness fix.
Attachment #461873 - Flags: approval2.0?
Comment on attachment 461873 [details] [diff] [review]
Proposed patch

Is there any way we can add a test to make sure that context menus brought up from the keyboard work?
(In reply to comment #7)
> Is there any way we can add a test to make sure that context menus brought up
> from the keyboard work?
Not obviously, as this depends on being able to synthesize an OS event, the bug being that the OS event was incorrectly converted to a Gecko event.
Comment on attachment 461873 [details] [diff] [review]
Proposed patch

OK, that's too bad.
Attachment #461873 - Flags: approval2.0? → approval2.0+
Pushed changeset c6c281075d0b to mozilla-central.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: