diff --git a/edit/edit.js b/edit/edit.js index 1b745ace..73e4667a 100644 --- a/edit/edit.js +++ b/edit/edit.js @@ -1370,10 +1370,6 @@ function initHooks() { document.getElementById('lint-help').addEventListener('click', showLintHelp); document.getElementById('lint').addEventListener('click', gotoLintIssue); window.addEventListener('resize', resizeLintReport); - window.addEventListener('load', function _() { - window.removeEventListener('load', _); - window.addEventListener('resize', () => debounce(rememberWindowSize, 100)); - }); // touch devices don't have onHover events so the element we'll be toggled via clicking (touching) if ('ontouchstart' in document.body) { @@ -1390,6 +1386,11 @@ function initHooks() { ).forEach(e => e.addEventListener('mousedown', toggleContextMenuDelete)); } + window.addEventListener('load', function _() { + window.removeEventListener('load', _); + window.addEventListener('resize', () => debounce(rememberWindowSize, 100)); + }); + setupGlobalSearch(); setCleanGlobal(); updateTitle();