onChange event doesn't fire when using 'Browse...' button in file select controls

RESOLVED DUPLICATE of bug 67873

Status

()

defect
RESOLVED DUPLICATE of bug 67873
16 years ago
a month ago

People

(Reporter: paul.lebeau, Assigned: saari)

Tracking

Trunk
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4a) Gecko/20030401
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4a) Gecko/20030401

When you use the 'Browse...' button to change the value of an <input type="file"
field.  The onChange event does not fire.

It does fire if you type something and tab to the button.

I note that the HTML 4.0 spec says that the onchange event should only fire
when the caret leaves the field, so I guess that this behaviour is strictly
conforming.  However, I suggest the behaviour should match IE and that the
event should also fire when the field is changed using the Browse.. button.

I don't think it is much of a stretch to treat using the browse button as
'virtually typing into the field and tabbing back to the button'.


Reproducible: Always

Steps to Reproduce:
Use following attachment to test the above.
Actual Results:  
alert box does not appear

Expected Results:  
alert box should pop up when 'Browse..' button used to change field
(Reporter)

Comment 1

16 years ago

Comment 2

16 years ago
is this a duplicate of bug 4033?
(Reporter)

Comment 3

16 years ago
I guess it's really an extension of bug 4033 since that doesn't really
talk about onChange events.

They are close enough that they should be tied though, so I am marking
this as depending on 4033.

Thanks for the pointer Kai, I didn't find 4033 when I reported this.

Depends on: 4033

Comment 4

16 years ago
Just noticed this problem myself and looked through bugzilla. This bug goes all
the way back to 2001. This is actually a dup of bug: 67873. I'm not sufficiently
empowered to change this, so Paul would you please do so yourself?
(Reporter)

Comment 5

16 years ago
You are right Martin.  Well spotted.

*** This bug has been marked as a duplicate of 67873 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → DUPLICATE
Component: Event Handling → User events and focus handling
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.