Skip to content

Commit

Permalink
Backport pull request #5653 from jellyfin-web/release-10.9.z
Browse files Browse the repository at this point in the history
Fix video OSD not fully hiding

Original-merge: 74a3bd8

Merged-by: thornbill <[email protected]>

Backported-by: Joshua M. Boniface <[email protected]>
  • Loading branch information
dmitrylyzo authored and joshuaboniface committed Jun 5, 2024
1 parent bd6f11e commit 5e8372c
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/controllers/playback/video/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,18 +323,14 @@ export default function (view) {
}

function clearHideAnimationEventListeners(elem) {
dom.removeEventListener(elem, transitionEndEventName, onHideAnimationComplete, {
once: true
});
elem.removeEventListener(transitionEndEventName, onHideAnimationComplete);
}

function onHideAnimationComplete(e) {
const elem = e.target;
if (elem != osdBottomElement) return;
elem.classList.add('hide');
dom.removeEventListener(elem, transitionEndEventName, onHideAnimationComplete, {
once: true
});
elem.removeEventListener(transitionEndEventName, onHideAnimationComplete);
}

const _focus = debounce((focusElement) => focusManager.focus(focusElement), 50);
Expand Down Expand Up @@ -364,9 +360,7 @@ export default function (view) {
clearHideAnimationEventListeners(elem);
elem.classList.add('videoOsdBottom-hidden');

dom.addEventListener(elem, transitionEndEventName, onHideAnimationComplete, {
once: true
});
elem.addEventListener(transitionEndEventName, onHideAnimationComplete);
currentVisibleMenu = null;
toggleSubtitleSync('hide');

Expand Down

0 comments on commit 5e8372c

Please sign in to comment.