Menu: leftClickToOpen=true menu placed incorrectly when opened via ENTER or SPACE
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.
Change History (4)
Milestone: |
tbd →
1.10
|
Owner: |
set to bill
|
Status: |
new →
assigned
|
Resolution: |
→ wontfix
|
Status: |
assigned →
closed
|
Summary: |
Menu: leftClickToOpen=true menu placed incorrectly when opened via keyboard →
Menu: 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.