Opened 12 years ago

Closed 12 years ago

#4933 closed defect (fixed)

menu and toolbar: separators can be focused with mouse click

Reported by: Becky Gibson Owned by: simonjb
Priority: high Milestone: 1.1
Component: Dijit Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Becky Gibson)

You can focus a MenuSeparator? and a ToolbarSeparator? and should not be allowed to. This is because these widgets get assigned a tabindex=-1 when added to the menu and toolbar. Did a quick fix for 1.0 to prevent an error (see #4927) but need to create a more complete solution.

The problem can be seen if you focus a toolbar button, then click on a toolbar separator that is not close to the button. The separator gets focus and the previously focused button loses focus indication. If you then press a right arrow key, focus will go to the button that was next to the previously focused button. Which is what we want but is visually odd.

The same problem occurs in the context menu but is not as evident since the menu item which was focused before the separator is clicked still "looks" focused.

The solution is to not allow focus to the separators.

Change History (5)

comment:1 Changed 12 years ago by Becky Gibson

Description: modified (diff)

comment:2 Changed 12 years ago by Becky Gibson

Summary: menu and toolbar: separat0rs can be focused with mouse clickmenu and toolbar: separators can be focused with mouse click

comment:3 Changed 12 years ago by bill

Owner: set to simonjb

Problem deals with code for arrow navigation between buttons / menu items. That code doesn't know that menuSeparator is special and shouldn't be focused. I guess we need some flag on widgets that aren't focusable (or widgets that are focusable).

comment:4 Changed 12 years ago by simonjb

Status: newassigned

comment:5 Changed 12 years ago by simonjb

Resolution: fixed
Status: assignedclosed

(In [12318]) In _KeyNavContainer, only set tabindex="-1" on focusable widgets; fixes #4933.

Note: See TracTickets for help on using tickets.