Skip to content

Commit

Permalink
fix: try
Browse files Browse the repository at this point in the history
  • Loading branch information
AyushAgrawal-A2 committed Dec 28, 2023
1 parent ec2f186 commit 4a462fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/block-std/src/event/control/range.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? '',
Expand All @@ -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;
}
Expand Down

0 comments on commit 4a462fd

Please sign in to comment.