Skip to content

Commit 075a98d

Browse files
committed
fix: remove unused ref
1 parent caae8e7 commit 075a98d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/components/LexicalEditor/ToolbarPlugin.jsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ function positionEditorElement(editor, rect) {
8989
function FloatingLinkEditor({ editor }) {
9090
const editorRef = useRef(null);
9191
const inputRef = useRef(null);
92-
const mouseDownRef = useRef(false);
9392
const [linkUrl, setLinkUrl] = useState("");
9493
const [isEditMode, setEditMode] = useState(false);
9594
const [lastSelection, setLastSelection] = useState(null);
@@ -134,9 +133,7 @@ function FloatingLinkEditor({ editor }) {
134133
rect = domRange.getBoundingClientRect();
135134
}
136135

137-
if (!mouseDownRef.current) {
138-
positionEditorElement(editorElem, rect);
139-
}
136+
positionEditorElement(editorElem, rect);
140137
setLastSelection(selection);
141138
} else if (!activeElement || activeElement.className !== "link-input") {
142139
positionEditorElement(editorElem, null);

0 commit comments

Comments
 (0)