fix(editor): whitelist the bar controls, not the whole bars
content-header and pagination were exempt from click-away in full, so their large empty areas were dead: clicking beside the title or next to the page buttons left the editor open. Only the actual controls are exempt now.
This commit is contained in:
@@ -7558,12 +7558,13 @@ async function init() {
|
||||
// the editor. Same for the table column picker dropdown.
|
||||
if (e.target.closest('.topbar')) return;
|
||||
if (e.target.closest('.sidebar')) 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.
|
||||
// Only the CONTROLS of the title row and the pager, not the whole bars:
|
||||
// whitelisting them wholesale made their (large) empty areas dead to
|
||||
// click-away, so clicking beside the title or next to the page buttons
|
||||
// left the editor open with no way to tell why.
|
||||
if (e.target.closest('.pagination button, .pagination select')) return;
|
||||
if (e.target.closest('.batch-bar')) return;
|
||||
if (e.target.closest('.content-header')) return;
|
||||
if (e.target.closest('#emptyTrashBtn')) return;
|
||||
// A toast or the busy spinner can land under the cursor mid-operation;
|
||||
// clicking one must not count as "clicked away from the editor".
|
||||
if (e.target.closest('.toast')) return;
|
||||
|
||||
Reference in New Issue
Block a user