Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove outdated Firefox check for slider bubble #290

Merged
merged 1 commit into from
Apr 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 23 additions & 26 deletions src/components/emby-slider/emby-slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand Down Expand Up @@ -269,4 +266,4 @@ define(['browser', 'dom', 'layoutManager', 'css!./emby-slider', 'registerElement
prototype: EmbySliderPrototype,
extends: 'input'
});
});
});