pressing enter in file upload control does not submit form

RESOLVED FIXED in Future

Status

()

Core
Layout: Form Controls
--
minor
RESOLVED FIXED
16 years ago
14 years ago

People

(Reporter: Niels Aufbau, Assigned: John Keiser (jkeiser))

Tracking

(Blocks: 1 bug, {testcase})

Trunk
Future
x86
Windows 98
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(3 attachments)

(Reporter)

Description

16 years ago
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.

Comment 1

16 years ago
Created attachment 61286 [details]
Reduced testcase

I am also seeing this on
Windows 98
Build ID:  2001121003

Updated

16 years ago
Keywords: testcase

Comment 2

16 years ago
->>
Assignee: rods → alexsavulov

Comment 3

16 years ago
setting milestone
Target Milestone: --- → Future

Comment 4

16 years ago
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
(Assignee)

Comment 5

16 years ago
Taking.
Assignee: alexsavulov → jkeiser
(Assignee)

Updated

16 years ago
Status: NEW → ASSIGNED
(Assignee)

Updated

16 years ago
Depends on: 104449
(Assignee)

Updated

15 years ago
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?
Created attachment 145183 [details] [diff] [review]
Something like this
Created attachment 145184 [details] [diff] [review]
Same as diff -b
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 12

14 years ago
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
Last Resolved: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.