Skip to content

Commit

Permalink
fix(edgeless): shift panel-wrapper to keep it in view (toeverything#6288
Browse files Browse the repository at this point in the history
)
  • Loading branch information
fundon authored Feb 23, 2024
1 parent 1e92bf9 commit f6d3d62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/blocks/src/page-block/edgeless/components/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertExists, type Disposable } from '@blocksuite/global/utils';
import { computePosition, flip, offset } from '@floating-ui/dom';
import { computePosition, flip, offset, shift } from '@floating-ui/dom';
import { css, html } from 'lit';

import {
Expand Down Expand Up @@ -81,6 +81,9 @@ export function createButtonPopper(
flip({
fallbackPlacements: ['bottom'],
}),
shift({
padding: 10,
}),
],
})
.then(({ x, y }) => {
Expand Down

0 comments on commit f6d3d62

Please sign in to comment.