WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
25497
onclick handler of submit button is not triggered when pressing enter key in input field
https://bugs.webkit.org/show_bug.cgi?id=25497
Summary
onclick handler of submit button is not triggered when pressing enter key in ...
Michael Du
Reported
2009-04-30 16:32:02 PDT
Steps: 1. create a form with a submit button in it like this: <button type="submit" onclick="alert('submit')"></button> and with at least 2 input fields in it 2. Input some text in any of the input fields and then press enter key Issue: Form gets submitted, but the onclick is ignored (unlike in other browsers) Other Browsers: IE7: OK FF3: OK Nightly tested: 42793 Bug in Chromium :
http://code.google.com/p/chromium/issues/detail?id=11113
Attachments
Here is a simple case on the issue.
(609 bytes, text/html)
2009-04-30 16:38 PDT
,
Michael Du
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Michael Du
Comment 1
2009-04-30 16:38:22 PDT
Created
attachment 29928
[details]
Here is a simple case on the issue. Here is a simple case on the issue.
Alexey Proskuryakov
Comment 2
2009-05-01 03:23:29 PDT
Confirmed with
r43111
.
Arvind
Comment 3
2009-06-03 22:37:23 PDT
Hi, I tried fixing this bug by adding an extra condition in the submitclick() function of Htmlformelement.cpp.When comparing for the input tag I tried comaparing for the button tag also which makes the test case to pass.Can this solution be used to fix this bug ?
Michael C.
Comment 4
2009-11-26 13:43:40 PST
In both Safari 4.0.4 (531.21.10) for Windows and Google Chrome 3.0.195.33, this bug is a simple matter of capitalization. "onclick" is ignored. "onClick" is obeyed.
Ojan Vafai
Comment 5
2010-11-29 10:29:20 PST
This appears to work on trunk.
dharitri
Comment 6
2012-10-15 04:22:32 PDT
I have a form with a input type as submit and a onClick event which calls a function. The problem is, i have a one more input type file. When i upload a file the onClick event stops working. If i remove the uploaded file. The onclick event on the submit button works again. There are no errors shown. The form is submitted perfectly without the file upload. Don't understand what is happening here.
Ojan Vafai
Comment 7
2012-10-22 12:13:19 PDT
(In reply to
comment #6
)
> I have a form with a input type as submit and a onClick event which calls a function. The problem is, i have a one more input type file. When i upload a file the onClick event stops working. If i remove the uploaded file. The onclick event on the submit button works again. There are no errors shown. The form is submitted perfectly without the file upload. Don't understand what is happening here.
Please file a new bug and point to the broken page or upload a reduced test case.
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