Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#11040 closed defect (fixed)

DropDownButton Enter and Space keys broken in IE8

Reported by: haysmark Owned by: bill
Priority: high Milestone: 1.5
Component: Dijit - Form Version: 1.4.0
Keywords: Cc:
Blocked By: Blocking:

Description

See:

http://archive.dojotoolkit.org/nightly/checkout/dijit/tests/form/robot/Button_a11y.html

In IE8, you should get 4 test failures, in the tests related to the space and enter keys. Indeed, when you tab over to the Edit button and press either Space or Tab in FF, the menu appears, but in IE8, nothing happens.

Change History (6)

comment:1 Changed 10 years ago by bill

Owner: set to bill
Status: newassigned

Hmm, too bad, this was broken in [21895] but I thought I had handled the issue in [21892]. I'll take another look.

comment:2 Changed 10 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [21981]) Refactoring code to make opening from DropDownButton via keyboard (space/enter key) work on IE8:

  • make _HasDropDown setup handlers on the focusNode, rather than domNode (simply by removing _buttonNode attach point), so that those handlers are isolated from the hidden <input> (which also fires a click event), and so the handlers still fire even though the ondijitclick code does a evt.preventDefault()
  • connect to onkeydown rather than onkeypress since the ondijitclick's evt.preventDefault() call (in the onkeydown handler) cancels the onkeypress event on IE8.

Fixes #11040, refs #11003.

comment:3 Changed 10 years ago by bill

(In [22001]) Second try to fix drop down menu opening via ENTER/SPACE key. Refactoring of _Has

  • Switched keyboard handling to onkeyup so that drop down doesn't receive spurious keyup event.
  • Separated keyboard and mouse handling into separate functions that don't call each other.
  • Since _HasDropDown monitors mousedown and mouseup explicitly (and also keyup), it didn't seem necessary to connect to the onclick event at all. That invalidates the _stopClickEvents flag; hopefully that doesn't break anything. FilePickerTextBox? still seems to work and so does DropDownButton/ComboButton?.

Refs #11040

comment:4 Changed 10 years ago by bill

(In [22010]) Not all drop downs (notably TooltipDialog) have a focus method. Refs #11040 !strict.

comment:5 Changed 10 years ago by bill

(In [22120]) [22001] shouldn't have removed the stopEvent() call on click, refs #11040

comment:6 Changed 9 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.