Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#17219 closed defect (wontfix)

Menu: leftClickToOpen=true menu placed incorrectly when opened via ENTER or SPACE

Reported by: bill Owned by: bill
Priority: undecided Milestone: 1.10
Component: Dijit Version: 1.9.0
Keywords: Cc:
Blocked By: Blocking:

Description

The leftClickToOpen code in Menu monitors for "click" events, so if it's on a <button> node then you can show the menu by using SPACE or ENTER key. But the menu shows up in the wrong place (the top left corner of the screen) because the Menu code is accessing evt.pageX and evt.pageY, which aren't defined.

Attachments (1)

leftClickTest.patch (3.1 KB) - added by bill 6 years ago.
test case for if the bug were fixed

Download all attachments as: .zip

Change History (4)

comment:1 Changed 6 years ago by bill

Milestone: tbd1.10
Owner: set to bill
Status: newassigned

comment:2 Changed 6 years ago by bill

Resolution: wontfix
Status: assignedclosed
Summary: Menu: leftClickToOpen=true menu placed incorrectly when opened via keyboardMenu: leftClickToOpen=true menu placed incorrectly when opened via ENTER or SPACE

I thought this would be easy, but it turns out it's hard to tell whether the click event came from mouse/touch or from keyboard. On IE, evt.pageX and evt.pageY give the mouse cursor coordinates even if the event was triggered by the keyboard.

Instead of listening for click events, I could connect to touch.release and keydown, but the keydown handling is complicated too, because I want to ignore SPACE key on <input> nodes (except <input type=button>), and ignore ENTER key on <textarea> nodes, etc. It actually already listens to keydown, but just for Shift-F10, thus avoiding those problems.

So, I don't think this is worth fixing. In 2.0, I probably don't want to support leftClickToOpen at all, because generally when you want that you should make the button extend _HasDropDown. So I'm going to close this as wontfix.

Note that it is already working according to the documentation, which says to use the left mouse button or Shift-F10.

Changed 6 years ago by bill

Attachment: leftClickTest.patch added

test case for if the bug were fixed

comment:3 Changed 6 years ago by Bill Keese <bill@…>

In 2545370c5e80da6671ef9a39b12ae9085ba7d6ef/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.