Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

100
Views
Input element range type does not support change event in FireFox or Safari. What is the workaround

I have a slider element in my data viz app that I want to fire an event with slider drag completes. This solution uses the change event and works fine in Chrome.

this.slider.addEventListener('change', e => {
    // do something when slider changes
})

However, FireFox and Safari only support the input event so the above approach will not work. What is the best work around to simulate change event in FireFox and Safari.

Here is all the relevant JS code

const slider = document.createElement('input')
slider.type = 'range'

slider.min = 10
slider.max = 20

document.body.appendChild(slider)

slider.addEventListener('change', e => {
  // do something when slider changes
  console.log("change");
})

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

False alarm. Solved. This is has nothing to do with the input/range element. I have one or more event handlers attached to the document that are consuming mouse events intended for the input/range element.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!