fix(editor): add shift middleware for tag select panel (#9664)
fix: BS-1749
This commit is contained in:
@@ -16,7 +16,7 @@ import {
|
|||||||
MoreHorizontalIcon,
|
MoreHorizontalIcon,
|
||||||
} from '@blocksuite/icons/lit';
|
} from '@blocksuite/icons/lit';
|
||||||
import { nanoid } from '@blocksuite/store';
|
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 { computed, type ReadonlySignal, signal } from '@preact/signals-core';
|
||||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||||
import { nothing } from 'lit';
|
import { nothing } from 'lit';
|
||||||
@@ -570,7 +570,7 @@ export const popTagSelect = (target: PopupTarget, ops: TagSelectOptions) => {
|
|||||||
};
|
};
|
||||||
const remove = createPopup(target, component, {
|
const remove = createPopup(target, component, {
|
||||||
onClose: ops.onComplete,
|
onClose: ops.onComplete,
|
||||||
middleware: [flip(), offset({ mainAxis: -28, crossAxis: 112 })],
|
middleware: [flip(), offset({ mainAxis: -28, crossAxis: 112 }), shift()],
|
||||||
container: ops.container,
|
container: ops.container,
|
||||||
});
|
});
|
||||||
return remove;
|
return remove;
|
||||||
|
|||||||
Reference in New Issue
Block a user