From 3090c7483233cd69c29860c13819cb9ca43ecb33 Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 26 Apr 2025 19:57:59 +0000 Subject: [PATCH] ie11: fix debounce-untint; css 'unset' appeared in chr41, ff27 dom.closest appeared in chr41, ff35 --- copyparty/web/browser.js | 6 +++--- copyparty/web/util.js | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) 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 {