1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fix "fixed element" condition

This commit is contained in:
Dmitry Lyzo 2019-10-23 22:38:01 +03:00
parent 0502e984ad
commit 90f565166e

View file

@ -365,7 +365,8 @@ define(["dom", "browser", "layoutManager"], function (dom, browser, layoutManage
var offsetParent = element.offsetParent;
var isFixed = offsetParent && !offsetParent.offsetParent;
// In Firefox offsetParent.offsetParent is BODY
var isFixed = offsetParent && (!offsetParent.offsetParent || window.getComputedStyle(offsetParent).position === "fixed");
// Scroll fixed elements to nearest edge (or do not scroll at all)
if (isFixed) {