Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#16925 closed defect (fixed)

Select test failure in FF19

Reported by: haysmark Owned by: Douglas Hays
Priority: undecided Milestone: 1.9
Component: Dijit - Form Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description

This description follows from a test failure in the Select robot automated test case.

See:

http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/form/test_Select.html

In FF19, tab to test two. Type "new m". You should get New Mexico, but instead you get New Hampshire. It passes in Chrome and IE.

Change History (8)

comment:1 Changed 7 years ago by Douglas Hays

Milestone: tbd1.9
Owner: changed from Douglas Hays to bill
Status: newassigned

_onContainerKeypress is being called twice with charCode=32. The 1st time with keyCode=undefined (a faux event?) and the 2nd time with keyCode=0 (real?).

comment:2 Changed 7 years ago by Douglas Hays

_onKeyNavMixin executes

evt.stopImmediatePropagation(); // stop _HasDropDown from processing the SPACE as well
evt.preventDefault(); // stop default actions like page scrolling on SPACE, but also keypress unfortunately

but the real keypress event is ignoring the stop event and occurring anyway.

comment:3 Changed 7 years ago by Douglas Hays

I can work around this in _onContainerKeypress by ignoring real events with charCode=SPACE when _searchTimer is running but stop event should work anyway.

comment:4 Changed 7 years ago by bill

Owner: changed from bill to Douglas Hays

Yes, preventDefault() on keydown doesn't necessarily stop keypress. The faux event is from your check in [30751]. Firing a faux keypress event seems dangerous, how about instead of that, have _KeyNavMixin set a this._searchInProgress flag (or some other name) and then _HasDropDown ignoring SPACE key if that flag is set?

comment:5 Changed 7 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

In [31080]:

Fixes #16925. Stop _HasDropDown from processing SPACE if a _KeyNavMixin search is in progress.

comment:6 Changed 7 years ago by bill

Resolution: fixed
Status: closedreopened

The fix seems reasonable but causes three failures in Menu_a11y.html (tested on IE8 and IE10).

comment:7 Changed 7 years ago by Douglas Hays

Resolution: fixed
Status: reopenedclosed

In [31124]:

Fixes #16925. Use stopImmediatePropagation from _KeyNavMixiin instead of having both _HasDropDown and a11yclick sniff _searchtimer to see if a keyboard search is in progress.

comment:8 Changed 7 years ago by Douglas Hays

In [31150]:

Refs #16925. IE8 requires preventDefault of keydown SPACE to prevent scrolling but that cancels the subsequent keypress event. Create _keyboardSearch method from _onContainerKeypress that can be called from keydown so that SPACE can be processed there.

Note: See TracTickets for help on using tickets.