From d9210a7aa15b717403550f42ca08f2a1ffab809b Mon Sep 17 00:00:00 2001 From: bugfixin Date: Fri, 26 Apr 2019 23:00:44 +0000 Subject: [PATCH] Remove outdated firefox exception for slider bubble --- src/components/emby-slider/emby-slider.js | 49 +++++++++++------------ 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/src/components/emby-slider/emby-slider.js b/src/components/emby-slider/emby-slider.js index 3daaf8841d7..1ca1448ea16 100644 --- a/src/components/emby-slider/emby-slider.js +++ b/src/components/emby-slider/emby-slider.js @@ -141,34 +141,31 @@ define(['browser', 'dom', 'layoutManager', 'css!./emby-slider', 'registerElement passive: true }); - // In firefox this feature disrupts the ability to move the slider - if (!browser.firefox) { - dom.addEventListener(this, (window.PointerEvent ? 'pointermove' : 'mousemove'), function (e) { - - if (!this.dragging) { - var rect = this.getBoundingClientRect(); - var clientX = e.clientX; - var bubbleValue = (clientX - rect.left) / rect.width; - bubbleValue *= 100; - updateBubble(this, bubbleValue, sliderBubble); - - if (hasHideClass) { - sliderBubble.classList.remove('hide'); - hasHideClass = false; - } + dom.addEventListener(this, (window.PointerEvent ? 'pointermove' : 'mousemove'), function (e) { + + if (!this.dragging) { + var rect = this.getBoundingClientRect(); + var clientX = e.clientX; + var bubbleValue = (clientX - rect.left) / rect.width; + bubbleValue *= 100; + updateBubble(this, bubbleValue, sliderBubble); + + if (hasHideClass) { + sliderBubble.classList.remove('hide'); + hasHideClass = false; } + } - }, { - passive: true - }); + }, { + passive: true + }); - dom.addEventListener(this, (window.PointerEvent ? 'pointerleave' : 'mouseleave'), function () { - sliderBubble.classList.add('hide'); - hasHideClass = true; - }, { - passive: true - }); - } + dom.addEventListener(this, (window.PointerEvent ? 'pointerleave' : 'mouseleave'), function () { + sliderBubble.classList.add('hide'); + hasHideClass = true; + }, { + passive: true + }); if (!supportsNativeProgressStyle) { @@ -269,4 +266,4 @@ define(['browser', 'dom', 'layoutManager', 'css!./emby-slider', 'registerElement prototype: EmbySliderPrototype, extends: 'input' }); -}); \ No newline at end of file +});