Closed
Bug 1039548
Opened 10 years ago
Closed 10 years ago
pressing enter causes a form submit if a radio button is selected and there are no text/number inputs in the form
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
VERIFIED
FIXED
mozilla34
Tracking | Status | |
---|---|---|
firefox34 | --- | verified |
People
(Reporter: io, Assigned: smaug)
Details
(Whiteboard: [testday-20141024])
Attachments
(2 files)
213 bytes,
text/html
|
Details | |
3.50 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0 SeaMonkey/2.26.1 (Beta/Release)
Build ID: 20140612174402
Steps to reproduce:
- open the attached test.html
- click on a radio button
- press the enter key
Actual results:
- the form is being submitted
Expected results:
I think the form should not be submitted, at least it does not submit in Chrome and in Internet Explorer (on these browsers pressing enter causes the radio button to be focused).
Also up to Firefox 26 the form is not being submitted, so this behavior changed starting from version 27 and is still present in version 30.
Component: Untriaged → Keyboard Navigation
OS: Windows 7 → All
Hardware: x86_64 → All
Component: Keyboard Navigation → Layout: Form Controls
Product: Firefox → Core
Comment 1•10 years ago
|
||
Hmm. This is the behavior I see on Mac:
1) Click on the radio button followed by hitting enter does not submit the form.
2) Tabbing to the radio button followed by hitting enter does submit the form.
We didn't use to do #2 in 26, indeed. Looks like the behavior changed in this range: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=9f63bbc00527&tochange=423b9c30c73d
I think this is a regression from bug 927365. The old behavior was to disable implicit submission unless there was exactly one text input; the new behavior is to disable if there are fewer than 2. In particular, in the case of 0 text inputs there used to be no implicit submission, but that got changed. Was that purposeful?
Status: UNCONFIRMED → NEW
Component: Layout: Form Controls → HTML: Form Submission
Ever confirmed: true
Flags: needinfo?(jwatt)
Flags: needinfo?(bugs)
Summary: pressing enter causes a form submit if a radio button is selected → pressing enter causes a form submit if a radio button is selected and there are no text/number inputs in the form
Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(jwatt)
Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8461781 -
Flags: review?(bzbarsky)
Comment 4•10 years ago
|
||
Comment on attachment 8461781 [details] [diff] [review]
patch
r=me
Attachment #8461781 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 5•10 years ago
|
||
Keywords: checkin-needed
Comment 6•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Updated•10 years ago
|
QA Whiteboard: [good first verify]
Comment 7•10 years ago
|
||
I can verify it's fixed using Windows 7 64 bit and the latest Beta.
Whiteboard: [testday-20141024]
Comment 8•10 years ago
|
||
Thank you Gabriela!
Status: RESOLVED → VERIFIED
status-firefox34:
--- → verified
Updated•6 years ago
|
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•