Skip to content

Commit c15a85d

Browse files
authored
fix: make link dialog tooltip inactive when text selection is true (#894)
1 parent 3b2ba7d commit c15a85d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/plugins/link-dialog/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ export const linkDialogState$ = Cell<InactiveLinkDialog | PreviewLinkDialog | Ed
248248
map(([[selection], activeEditor, _, readOnly]) => {
249249
if ($isRangeSelection(selection) && activeEditor && !readOnly) {
250250
const node = getLinkNodeInSelection(selection)
251-
251+
if (!selection.isCollapsed()) return { type: 'inactive' } as InactiveLinkDialog
252252
if (node) {
253253
const rect = getSelectionRectangle(activeEditor)
254254

0 commit comments

Comments
 (0)