WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
13020
REGRESSION: Returning false from onkeypress event on Input is ignored when key is Tab
https://bugs.webkit.org/show_bug.cgi?id=13020
Summary
REGRESSION: Returning false from onkeypress event on Input is ignored when ke...
Elliott Sprehn
Reported
2007-03-08 23:06:46 PST
An onkeypress event handler for an input element which returns false to abort the key press will be ignored when the key that was pressed was Tab. The return value of false is obeyed when the key is not the Tab key. However, If the onkeydown event is used instead the return value of false will be obeyed for Tab. This new behavior is consistent with IE, however it is inconsistent with Gecko and previous versions of Safari. Reproducible in latest nightly: (Fri Mar 9 6:30:40 GMT 2007)
Attachments
Test Case
(884 bytes, text/html)
2007-03-08 23:18 PST
,
Elliott Sprehn
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Elliott Sprehn
Comment 1
2007-03-08 23:18:45 PST
Created
attachment 13554
[details]
Test Case In this test case pressing tab in both inputs should do nothing as per previous Safari behavior. However in the input where the event handler was attached with onkeypress the return value of false is ignored and the focus jumps off the input to the Back button in the browser.
Elliott Sprehn
Comment 2
2007-03-08 23:20:40 PST
It should also be noted that Gecko allows aborting Tab key presses with onkeypress, but *not* with onkeydown, which is the exact opposite of this bug.
Alexey Proskuryakov
Comment 3
2007-03-09 09:20:36 PST
Confirmed as a regression with
r20057
.
Mark Rowe (bdash)
Comment 4
2007-03-13 16:22:00 PDT
<
rdar://problem/5061024
>
Adele Peterson
Comment 5
2007-03-23 14:25:51 PDT
Committed revision 20453.
Alexey Proskuryakov
Comment 6
2008-01-21 04:47:22 PST
We no longer dispatch keypress event for tab, arrow keys etc., so this fix has been effectively undone.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug