Input range fires “input” event on mouseup

RESOLVED FIXED in Firefox 50

Status

()

Core
DOM: Events
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: yair even or, Assigned: smaug)

Tracking

47 Branch
mozilla50
Points:
---

Firefox Tracking Flags

(firefox47 affected, firefox48 affected, firefox50 fixed)

Details

(URL)

Attachments

(4 attachments)

(Reporter)

Description

2 years ago
Created attachment 8771770 [details]
GIF.gif

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0
Build ID: 20160711002726

Steps to reproduce:

Stackoverflow discussion: http://stackoverflow.com/q/38420339/104380
Demo page : http://jsbin.com/galijekovi/edit?html,css,js,output
Firefox Version: 48.0b7
OS: windows 7


Try to click the slider (input range) and then release the mouse


Actual results:

"events fired" count was incremented by "1"


Expected results:

"events fire" should not fire when releasing the mouse, only while dragging (input event)

This causes bugs in sensitive cases where this is not the expected behavior.
(Reporter)

Updated

2 years ago
OS: Unspecified → Windows 7
Hardware: Unspecified → x86_64

Comment 1

2 years ago
Problem recreated using FF 47.0
Problem exist also on 48 on Linux.
Status: UNCONFIRMED → NEW
status-firefox47: --- → affected
status-firefox48: --- → affected
Component: Untriaged → DOM: Events
Ever confirmed: true
OS: Windows 7 → All
Product: Firefox → Core
Hardware: x86_64 → All
Version: 48 Branch → 47 Branch
Olli, I feel like I've seen you comment on a range bug recently ...
Flags: needinfo?(bugs)
(Assignee)

Comment 4

2 years ago
This is a simple bug fix.
Assignee: nobody → bugs
Flags: needinfo?(bugs)
(Assignee)

Updated

2 years ago
Attachment #8772618 - Flags: review?(amarchesini)
Comment on attachment 8772618 [details] [diff] [review]
range_mousemove.diff

Review of attachment 8772618 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/html/test/test_bug1287321.html
@@ +52,5 @@
> +</head>
> +<body>
> +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1287321">Mozilla Bug 1287321</a>
> +<p id="display"></p>
> +<div id="content" style="display: none">

remove this <p> and <div> and <pre>
Attachment #8772618 - Flags: review?(amarchesini) → review+
(Assignee)

Comment 7

2 years ago
I always keep them since that is what the mochitest generator gives. I always thought mochitest uses them for something, like for reporting results. But maybe not.
(Assignee)

Comment 8

2 years ago
Created attachment 8772939 [details] [diff] [review]
+simpler test
(Assignee)

Comment 9

2 years ago
Created attachment 8772942 [details] [diff] [review]
export for checkin
(Assignee)

Updated

2 years ago
Keywords: checkin-needed

Comment 10

2 years ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/fx-team/rev/8f018f9e7725
Don't fire input event on type=range when value hasn't changed. r=baku
Keywords: checkin-needed

Comment 11

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/8f018f9e7725
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox50: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.