Opened 11 years ago

Closed 10 years ago

#8978 closed defect (fixed)

odijitclick: ENTER key causes spurious click on focused node (IE)

Reported by: bill Owned by: Becky Gibson
Priority: high Milestone: 1.4
Component: Accessibility Version: 1.3.0b3
Keywords: Cc:
Blocked By: Blocking:

Description

See _Widget-ondijitclick.html for test case. "Clicking" the div by using the ENTER key (while the div is focused) causes a spurious click event on the plain button.

The problem is with keyup/keydown handling, that ondijitclick for ENTER key is firing on keydown, at which point the user defined handler shifts focus to the plain button, and the onkeyup event triggers a click event on the button. Not sure why we are using keydown instead of keyup for ENTER, since we are doing keydown for SPACE.

(PS: I thought I filed this bug already but all I can find is #8946 and #8951, which are slightly different)

Change History (5)

comment:1 Changed 11 years ago by bill

There are tests for this in tests/robot/_Widget-ondijitclick_a11y.html.

I'm going to comment them out for now but they should be uncommented when this and #8946 are fixed.

comment:2 Changed 11 years ago by Becky Gibson

Milestone: tbd1.3.1

comment:3 Changed 11 years ago by bill

Milestone: 1.3.11.4

Talked with Becky about the ondijitclick bugs; agreed to move them to 1.4 since they aren't regressions

comment:4 Changed 10 years ago by bill

(In [17612]) Reverse test: test that keyboard-clicking an ondijitclick <div> which shifts focus to a native <button> won't cause the native button to get a spurious click event.

Refs #8978

comment:5 Changed 10 years ago by Becky Gibson

Resolution: fixed
Status: newclosed

(In [17832]) fixes #8879, #8946, #8951, #8978, #8979, #9304, #9156 rework of ondijitclick event handler. Perform action only on keyup of enter or space. Track object that receives keydown and only invoke action on keyup when target matches the keydown object. Do not use ondijitclick for elements that already have onclick support for enter and space key press (button, links) or when that onclick event will bubble up to a parent element. Thus, changed button and combobutton templates to use onclick rather than ondijitclick. No longer need special case for submit and reset buttons in button.js _onButtonClick(). Updated button_a11y.html test file to include test of submit and reset buttons. Updated widget-ondijitclick.html to again include space and enter key testing. !strict

Note: See TracTickets for help on using tickets.