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)

27 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla34
Tracking Status
firefox34 --- verified

People

(Reporter: io, Assigned: smaug)

Details

(Whiteboard: [testday-20141024])

Attachments

(2 files)

Attached file test.html
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
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
No.
Assignee: nobody → bugs
Flags: needinfo?(bugs)
Flags: needinfo?(jwatt)
Attachment #8461781 - Flags: review?(bzbarsky) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
QA Whiteboard: [good first verify]
I can verify it's fixed using Windows 7 64 bit and the latest Beta.
Whiteboard: [testday-20141024]
Thank you Gabriela!
Status: RESOLVED → VERIFIED
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: