diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 5fdb4659..3e589ac5 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -8313,7 +8313,7 @@ var treectl = (function () { document.documentElement.scrollLeft = 0; setTimeout(function () { r.gentab(get_evpath(), r.lsc); - ebi('wrap').style.opacity = 'unset'; + ebi('wrap').style.opacity = CLOSEST ? 'unset' : 1; }, 1); }; @@ -8466,7 +8466,7 @@ var wfp_debounce = (function () { if (--r.n <= 0) { r.n = 0; clearTimeout(r.t); - ebi('wfp').style.opacity = 'unset'; + ebi('wfp').style.opacity = CLOSEST ? 'unset' : 1; } }; r.reset = function () { @@ -9704,7 +9704,7 @@ window.addEventListener("message", function (e) { el.parentNode.removeChild(el.previousSibling); el.style.height = (parseInt(t[2]) + SBH) + 'px'; - el.style.visibility = 'unset'; + el.style.visibility = CLOSEST ? 'unset' : 'block'; wfp_debounce.show(); } else if (t[0] == 'iscroll') { diff --git a/copyparty/web/util.js b/copyparty/web/util.js index 17fb1943..e2c37ec2 100644 --- a/copyparty/web/util.js +++ b/copyparty/web/util.js @@ -364,7 +364,8 @@ if (!Element.prototype.matches) Element.prototype.mozMatchesSelector || Element.prototype.webkitMatchesSelector; -if (!Element.prototype.closest) +var CLOSEST = !!Element.prototype.closest; +if (!CLOSEST) Element.prototype.closest = function (s) { var el = this; do {