Opened 10 years ago

Closed 10 years ago

#9528 closed defect (fixed)

[patch] [cla] ESC keyboard event not working on webkit

Reported by: bill Owned by: Douglas Hays
Priority: high Milestone: 1.4
Component: Events Version: 1.3.0
Keywords: Cc: Joseph Scheuhammer, Becky Gibson
Blocked By: Blocking:

Description (last modified by bill)

See enterKeyPress.html. ESCAPE key does not produce any event.

This is based on #9506 but just filing a separate ticket for clarity, since it's a general events problem, not something wrong w/dijit.

Attachments (1)

9528.patch (782 bytes) - added by Douglas Hays 10 years ago.
Patch to send fake keypress on ESC

Download all attachments as: .zip

Change History (11)

comment:1 Changed 10 years ago by bill

Description: modified (diff)

comment:2 Changed 10 years ago by bill

(In [18744]) Automated test for keyboard event handling, showing safari 4 problems with ESC and ctrl-q. Refs #9511, #9527, #9528.

Maybe this should be added to runTests.html although we don't have any robot tests in there currently.

comment:3 Changed 10 years ago by Becky Gibson

Milestone: tbd1.3.2

comment:4 Changed 10 years ago by Adam Peller

Milestone: 1.3.21.4

Safari never had keyboard support. consider for 1.4

comment:5 Changed 10 years ago by bill

Summary: ESC keyboard event not working on safari 4ESC keyboard event not working on webkit

Note that dijit's _FormWidget.js has some workaround code related to this, in _onKeyDown:

}else if(dojo.isWebKit){ // ESCAPE needs help making it into keypress
        te = document.createEvent('Events');
        te.initEvent('keypress', true, true);
        te.keyCode = dojo.keys.ESCAPE;
        te.shiftKey = e.shiftKey;
        e.target.dispatchEvent(te);
}

Obviously it would be better to handle that in core.

Changed 10 years ago by Douglas Hays

Attachment: 9528.patch added

Patch to send fake keypress on ESC

comment:6 Changed 10 years ago by Douglas Hays

Cc: Joseph Scheuhammer Becky Gibson added

This patch seems to fix #6184 as well and will allow redundant fake keypress code to be removed from _FormWidget.s and popup.js in dijit.

comment:7 Changed 10 years ago by bill

Priority: normalhigh
Summary: ESC keyboard event not working on webkit[patch] [cla] ESC keyboard event not working on webkit

Cool, this looks great. ESC is unprintable, I don't know why it wasn't categorized that way to begin with. Probably just an oversight?

I'm marking this as high-priority to remember to add it before we go beta.

comment:8 Changed 10 years ago by Becky Gibson

this patch also fixes #9928

comment:9 Changed 10 years ago by Douglas Hays

Owner: changed from sjmiles to Douglas Hays
Status: newassigned

comment:10 Changed 10 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

(In [20306]) Fixes #6184, #9528, #6184 !strict. Forced Esc key to generate fake keypress on WebKit?. Removed keydown special WebKit/Esc? processing from dijit's popup.js and _FormWidget.js. Verified that dijit's robot tests ComboBox_a11y.html, Dialog_a11y.html, and Menu_a11y.html now run without errors on Safari4/Windows.

Note: See TracTickets for help on using tickets.