fix(editor): batch-bar clicks no longer dismiss the editor

The click-outside handler whitelists chrome (topbar, sidebar, pagination…)
but not .batch-bar, so Delete / Clear / Move to folder / Add tag counted as
an outside click and ran requestCloseSlideOver before their own handler.
Whitelist it, plus .content-header which carries buttons of its own
(Empty trash). Those actions now decide for themselves what happens to the
editor via closeEditorForDeleted.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
r-zakarya
2026-07-22 23:33:52 +01:00
parent 3dbce780d2
commit e1ddc65f85
+5
View File
@@ -7275,6 +7275,11 @@ async function init() {
if (e.target.closest('.topbar')) return; if (e.target.closest('.topbar')) return;
if (e.target.closest('.sidebar')) return; if (e.target.closest('.sidebar')) return;
if (e.target.closest('.pagination')) return; if (e.target.closest('.pagination')) return;
// Selection toolbar + the view's title row (which carries buttons
// like Empty trash) are chrome as well — their actions decide for
// themselves what happens to the editor.
if (e.target.closest('.batch-bar')) return;
if (e.target.closest('.content-header')) return;
if (e.target.closest('.cols-menu')) return; if (e.target.closest('.cols-menu')) return;
if (e.target.closest('.filters-menu')) return; if (e.target.closest('.filters-menu')) return;
if (e.target.closest('.user-menu')) return; if (e.target.closest('.user-menu')) return;