diff --git a/src/elements/emby-slider/emby-slider.js b/src/elements/emby-slider/emby-slider.js index 89db161aad3..8c572f64740 100644 --- a/src/elements/emby-slider/emby-slider.js +++ b/src/elements/emby-slider/emby-slider.js @@ -239,10 +239,7 @@ function setMarker(range, valueMarker, marker, valueProgress) { return; } - let markerPos = (bubbleTrackRect.width * valueMarker / 100) - markerRect.width / 2; - markerPos = Math.min(Math.max(markerPos, - markerRect.width / 2), bubbleTrackRect.width - markerRect.width / 2); - - marker.style.left = markerPos + 'px'; + marker.style.left = `calc(${valueMarker}% - ${markerRect.width / 2}px)`; if (valueProgress >= valueMarker) { marker.classList.remove('unwatched');