From 4a462fdf631896cb8e3816fd83590e184efa00f9 Mon Sep 17 00:00:00 2001 From: Ayush Agrawal <54364088+AyushAgrawal-A2@users.noreply.github.com> Date: Fri, 29 Dec 2023 00:18:56 +0530 Subject: [PATCH] fix: try --- packages/block-std/src/event/control/range.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/block-std/src/event/control/range.ts b/packages/block-std/src/event/control/range.ts index 37cbf16646966..29245a81e399c 100644 --- a/packages/block-std/src/event/control/range.ts +++ b/packages/block-std/src/event/control/range.ts @@ -90,6 +90,8 @@ export class RangeControl { return; if (startElement.closest('.blocksuite-portal')) return; + if (startElement.closest('affine-menu')) return; + if (startElement.closest('affine-multi-tag-select')) return; const pageBlock = this._dispatcher.std.view.viewFromPath('block', [ this._dispatcher.std.page.root?.id ?? '', @@ -100,10 +102,12 @@ export class RangeControl { assertExists(viewport); if (!viewport.contains(range.startContainer)) { + console.log(startElement); this._dispatcher.focus = false; return; } if (!viewport.contains(range.endContainer)) { + console.log(startElement); this._dispatcher.focus = false; return; }