fix(editor): add shift middleware for tag select panel (#9664)

fix: BS-1749
This commit is contained in:
zzj3720
2025-01-13 09:05:05 +00:00
parent e72371d15c
commit 810e656174

View File

@@ -16,7 +16,7 @@ import {
MoreHorizontalIcon,
} from '@blocksuite/icons/lit';
import { nanoid } from '@blocksuite/store';
import { flip, offset } from '@floating-ui/dom';
import { flip, offset, shift } from '@floating-ui/dom';
import { computed, type ReadonlySignal, signal } from '@preact/signals-core';
import { cssVarV2 } from '@toeverything/theme/v2';
import { nothing } from 'lit';
@@ -570,7 +570,7 @@ export const popTagSelect = (target: PopupTarget, ops: TagSelectOptions) => {
};
const remove = createPopup(target, component, {
onClose: ops.onComplete,
middleware: [flip(), offset({ mainAxis: -28, crossAxis: 112 })],
middleware: [flip(), offset({ mainAxis: -28, crossAxis: 112 }), shift()],
container: ops.container,
});
return remove;