Keyboard navigation interference in Dojo 1.9 and later

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Keyboard navigation interference in Dojo 1.9 and later

Earl Hood
For the project I am working on, we are upgrading Dojo from 1.8.10 to a
later release (currently trying 1.11.2).  Note, we are still using the
non-AMD coding style (project is quite old), but I figure non-AMD/AMD coding
is not relevant to the following problem:

One behavioral problem we have encountered is the interference with keyboard
nagivation of dijit widgets and global key event handlers we use.  In our
application, we process Alt+Left-Arrow and Alt+Right-Arrow keyboard events
to perform specific action.  This seems to work fine in Dojo 1.8.x and
earlier.  In Dojo 1.9 and later, this fails when certain dijit widgets have
current focus.

Diving into the Dojo source code, it appears the behavior change (bug?)
occurs due to the introduction of dijit/_KeyNavMixin.  In 1.8,
dijit/_KeyNavContainer has explicit checks for Ctrl and Alt, and if present
in the event, no action is performed.  In 1.9, and later, dijit/_KeyNavMixin
is managing the events, but I see no check for Ctrl and Alt, so
_onLeftArrow() and _onRighArrow() get triggered regardless of any key

Would this be classified as bug?

Dojo Toolkit:

[hidden email]
To unsubscribe, visit: