Open Bug 1910256 Opened 1 year ago Updated 1 year ago

JavaScript file input events not working in Firefox, but work in Chrome and Edge

Categories

(Core :: DOM: Core & HTML, defect)

Firefox 128
defect

Tracking

()

UNCONFIRMED

People

(Reporter: temidayoazeez032, Unassigned, NeedInfo)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0

Steps to reproduce:

  1. Create an HTML file with a file input element and JavaScript event listeners for 'change' events.
  2. Open the HTML file in Firefox.
  3. Select a file using the file input.
  4. Observe that the event does not fire.
  5. Open the same HTML file in Chrome or Edge and select a file.
  6. Observe that the event fires correctly.

Actual results:

The 'change' event does not fire when a file is selected in Firefox.

Expected results:

The 'change' event should fire when a file is selected in the file input in Firefox, just as it does in Chrome and Edge.

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Core & HTML' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core

Hi Adam, would you please take a look at what's up in our code?

Flags: needinfo?(avandolder)
Attached file Simple test case
Flags: needinfo?(avandolder)

Hi Reporter,
I wrote a simple test case and I got the "change" event filed as expected. Is this how you tested this? If not, and if you still see the problem, please attach a simple test case. And it's worthwhile testing with addons (if any) disabled.

Flags: needinfo?(temidayoazeez032)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: