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 377432 0a4c1b6c15a2f5c862c7158bb94e626960db9215
parent 377431 bbbbcc7e8a1bf0b432f22a04994d920a091c591f
child 377433 657cf05df28dc12563e8f43709de761335628cc6
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [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 ---");
       }
     };