mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
Merge pull request #290 from bugfixin/firefox-sliderbubble
Remove outdated Firefox check for slider bubble
This commit is contained in:
commit
96d4f50b74
@ -141,34 +141,31 @@ define(['browser', 'dom', 'layoutManager', 'css!./emby-slider', 'registerElement
|
|||||||
passive: true
|
passive: true
|
||||||
});
|
});
|
||||||
|
|
||||||
// In firefox this feature disrupts the ability to move the slider
|
dom.addEventListener(this, (window.PointerEvent ? 'pointermove' : 'mousemove'), function (e) {
|
||||||
if (!browser.firefox) {
|
|
||||||
dom.addEventListener(this, (window.PointerEvent ? 'pointermove' : 'mousemove'), function (e) {
|
|
||||||
|
|
||||||
if (!this.dragging) {
|
if (!this.dragging) {
|
||||||
var rect = this.getBoundingClientRect();
|
var rect = this.getBoundingClientRect();
|
||||||
var clientX = e.clientX;
|
var clientX = e.clientX;
|
||||||
var bubbleValue = (clientX - rect.left) / rect.width;
|
var bubbleValue = (clientX - rect.left) / rect.width;
|
||||||
bubbleValue *= 100;
|
bubbleValue *= 100;
|
||||||
updateBubble(this, bubbleValue, sliderBubble);
|
updateBubble(this, bubbleValue, sliderBubble);
|
||||||
|
|
||||||
if (hasHideClass) {
|
if (hasHideClass) {
|
||||||
sliderBubble.classList.remove('hide');
|
sliderBubble.classList.remove('hide');
|
||||||
hasHideClass = false;
|
hasHideClass = false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
passive: true
|
passive: true
|
||||||
});
|
});
|
||||||
|
|
||||||
dom.addEventListener(this, (window.PointerEvent ? 'pointerleave' : 'mouseleave'), function () {
|
dom.addEventListener(this, (window.PointerEvent ? 'pointerleave' : 'mouseleave'), function () {
|
||||||
sliderBubble.classList.add('hide');
|
sliderBubble.classList.add('hide');
|
||||||
hasHideClass = true;
|
hasHideClass = true;
|
||||||
}, {
|
}, {
|
||||||
passive: true
|
passive: true
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
if (!supportsNativeProgressStyle) {
|
if (!supportsNativeProgressStyle) {
|
||||||
|
|
||||||
@ -269,4 +266,4 @@ define(['browser', 'dom', 'layoutManager', 'css!./emby-slider', 'registerElement
|
|||||||
prototype: EmbySliderPrototype,
|
prototype: EmbySliderPrototype,
|
||||||
extends: 'input'
|
extends: 'input'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user