Closed Bug 111689 Opened 23 years ago Closed 20 years ago

pressing enter in file upload control does not submit form

Categories

(Core :: Layout: Form Controls, defect)

x86
Windows 98
defect
Not set
minor

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: aufbau01, Assigned: john)

References

(Blocks 1 open bug, )

Details

(Keywords: testcase)

Attachments

(3 files)

Steps to reproduce:
1. Go to http://validator.w3.org/file-upload.html
2. Type in a filename.
3. Press enter.

Actual result: nothing happens, have to click on "Validate this document" to
submit the form.

Expected result: hitting enter should submit the form, like it does in a normal
textbox.
Attached file Reduced testcase
I am also seeing this on
Windows 98
Build ID:  2001121003
Keywords: testcase
->>
Assignee: rods → alexsavulov
setting milestone
Target Milestone: --- → Future
See also bug 104449, "Enter does not submit from all form controls".  Bug 104449
specifically mentions dropdown listboxes but no other controls.
Summary: pressing enter in filename textbox does not submit form → pressing enter in file upload control does not submit form
Taking.
Assignee: alexsavulov → jkeiser
Status: NEW → ASSIGNED
Depends on: 104449
Blocks: 104449
No longer depends on: 104449
So what behavior do we want here and in bug 104449?  It's pretty easy to make
file inputs submit, if that's what we want to do...  jst?  peterv?  Thoughts?
Comment on attachment 145184 [details] [diff] [review]
Same as diff -b

The change to not check mForm before firing onchange is needed because the
textbox inside the file input doesn't have an mForm.  I think it's more correct
this way in general, though.
Attachment #145184 - Flags: superreview?(jst)
Attachment #145184 - Flags: review?(jst)
Comment on attachment 145184 [details] [diff] [review]
Same as diff -b

Yeah, I think this is exactly what we'd want. Should we push this in for 1.7?
Attachment #145184 - Flags: superreview?(jst)
Attachment #145184 - Flags: superreview+
Attachment #145184 - Flags: review?(jst)
Attachment #145184 - Flags: review+
Comment on attachment 145184 [details] [diff] [review]
Same as diff -b

I think so.  This is certainly safe enough.
Attachment #145184 - Flags: approval1.7?
Comment on attachment 145184 [details] [diff] [review]
Same as diff -b

a=chofmann for 1.7
Attachment #145184 - Flags: approval1.7? → approval1.7+
Checked in for 1.7
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: