Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#3705 closed defect (fixed)

menu does not close itself on left click

Reported by: guest Owned by: bill
Priority: high Milestone: 0.9
Component: Dijit Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

Maybe I'm missing something, but in test_Menu.html once a menu is popuped up, left click on the background no longer closes it?

Change History (8)

comment:1 Changed 12 years ago by bill

Resolution: fixed
Status: newclosed

(In [9577]) onBlur for context menus (if you click on a blank part of the screen to close it). Fixes #3705.

comment:2 Changed 12 years ago by guest

Resolution: fixed
Status: closedreopened

Menu won't close if you left click on text box. And after that it won't close if you left click on empty area either.

comment:3 Changed 12 years ago by guest

Did some more testing, it seem the menu sometimes will close itself when clicking on the text box, sometimes it won't.

If you scroll down the page open the menu via right click, then left click on the text, then sometimes it won't close...

comment:4 Changed 12 years ago by guest

Okay, I got a repro:

Left click empty area. Right click empty area to open menu. Left click empty area (menu closes) Right click empty area to open menu. Left click empty area (menu does not close)

comment:5 Changed 12 years ago by bill

Milestone: 0.9

OK, good test case. I will fix.

comment:6 Changed 12 years ago by bill

Actually this is very complicated. The root of the problem is that when closing the menu (in your test case) we can't return focus to where it was before because *nothing* was focused before. Thus focus stays on the closed context menu, and then bad things start to happen (when the menu is reopened focus remains on the first MenuItem?, unchanged, so there's no focus event).

I want to talk to Becky and the a11y folks about what makes sense to do here.

comment:7 Changed 12 years ago by bill

Resolution: fixed
Status: reopenedclosed

(In [9613]) Changes to get left-click to close a menu tree on all browsers.

  1. Focus events weren't getting reported in the case that focus shifted from node --> nothing --> back to node. This happened when focus was on nothing, you opened a context menu, then closed it, then opened it again.
  1. Since Safari doesn't seem to give focus notification on the menu items (are they even getting focused?), added entered()/executed() callbacks for dijit.util.popup to notify when a popup is appears/disappears.

Fixes #3705

comment:8 Changed 12 years ago by bill

(In [9634]) Remove code to blur() menu item when it is no longer the selected item. Confuses Windows-Eyes screen reader (fixes #3739)

Also, blur seems to be occuring too late (when a context menu closes, I meant for the blur() to happen first, followed by focusing on the thing that had focus before the context menu opened, but seems to happen the other way. (refs #3705)

Note: See TracTickets for help on using tickets.