mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
fix: Context menu positioning when component has offsets (#5520)
Update Popover.tsx
This commit is contained in:
parent
2820cd112e
commit
aca284057d
1 changed files with 0 additions and 1 deletions
|
@ -69,7 +69,6 @@ export const Popover = ({
|
|||
if (fitInViewport && popoverRef.current) {
|
||||
const element = popoverRef.current;
|
||||
const { x, y, width, height } = element.getBoundingClientRect();
|
||||
const { innerWidth: viewportWidth, innerHeight: viewportHeight } = window;
|
||||
|
||||
//Position correctly when clicked on rightmost part or the bottom part of viewport
|
||||
if (x + width - offsetLeft > viewportWidth) {
|
||||
|
|
Loading…
Add table
Reference in a new issue