Bug 1328061 - Restore dragging state when video seeks to the same point twice. r=Gijs
authorRay Lin <ralin@mozilla.com>
Wed, 18 Jan 2017 10:52:19 +0800
changeset 375148 0a4c1b6c15a2f5c862c7158bb94e626960db9215
parent 375147 bbbbcc7e8a1bf0b432f22a04994d920a091c591f
child 375149 657cf05df28dc12563e8f43709de761335628cc6
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1328061
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1328061 - Restore dragging state when video seeks to the same point twice. r=Gijs MozReview-Commit-ID: 2AiMzufcKyd
toolkit/content/widgets/videocontrols.xml
--- a/toolkit/content/widgets/videocontrols.xml
+++ b/toolkit/content/widgets/videocontrols.xml
@@ -1740,16 +1740,19 @@
 
         addListener(this.videocontrols, "dragstart", function(event) {
           event.preventDefault(); // prevent dragging of controls image (bug 517114)
         });
 
         if (!this.videocontrols.isTouchControls) {
           addListener(this.scrubber, "input", this.onScrubberInput);
           addListener(this.scrubber, "change", this.onScrubberChange);
+          // add mouseup listener additionally to handle the case that `change` event
+          // isn't fired when the input value before/after dragging are the same. (bug 1328061)
+          addListener(this.scrubber, "mouseup", this.onScrubberChange);
           addListener(this.volumeControl, "input", this.updateVolume);
           addListener(this.video.textTracks, "addtrack", this.onTextTrackAdd);
           addListener(this.video.textTracks, "removetrack", this.onTextTrackRemove);
         }
 
         this.log("--- videocontrols initialized ---");
       }
     };