Skip to content

Commit

Permalink
Merge pull request #3609 from sakshikale14/fix-floating-link-issue
Browse files Browse the repository at this point in the history
floating link button correction
  • Loading branch information
zbeyens authored Oct 4, 2024
2 parents 1ce417e + 873328b commit 2975349
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/loud-pugs-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@udecode/plate-link': patch
---

Fixed floating link issue #3609
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import {
useHotkeys,
} from '@udecode/plate-common/react';
import {
getDefaultBoundingClientRect,
getRangeBoundingClientRect,
getSelectionBoundingClientRect,
} from '@udecode/plate-floating';

import type { LinkFloatingToolbarState } from './useFloatingLinkInsert';
Expand Down Expand Up @@ -52,7 +52,7 @@ export const useFloatingLinkEditState = ({
});
}

return getDefaultBoundingClientRect();
return getSelectionBoundingClientRect();
}, [editor, type]);

const isOpen = open && mode === 'edit';
Expand Down

0 comments on commit 2975349

Please sign in to comment.