diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 70be7ad0..501e5d89 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -7420,6 +7420,7 @@ function onwrapscroll () { lastY = newY; } +window.addEventListener('scroll', onwrapscroll); function onwidgetresize(){ var widget = ebi('widget'); @@ -7432,15 +7433,6 @@ function onwidgetresize(){ clmod(ebi('pathBar'), 'thin', thin); clmod(ebi('wrap'), 'thin', thin); - if(thin && !ows_active){ - window.addEventListener('scroll', onwrapscroll); - ows_active = true; - } - else if (!thin && ows_active){ - window.removeEventListener('scroll', onwrapscroll); - ows_active = false; - } - thin = thin || IE; var gtc = 'max-content max-content max-content ' + (thin ? '' : '20%') + ' auto max-content max-content max-content';