fix: remove unused ref
This commit is contained in:
parent
caae8e7385
commit
075a98d444
@ -89,7 +89,6 @@ function positionEditorElement(editor, rect) {
|
|||||||
function FloatingLinkEditor({ editor }) {
|
function FloatingLinkEditor({ editor }) {
|
||||||
const editorRef = useRef(null);
|
const editorRef = useRef(null);
|
||||||
const inputRef = useRef(null);
|
const inputRef = useRef(null);
|
||||||
const mouseDownRef = useRef(false);
|
|
||||||
const [linkUrl, setLinkUrl] = useState("");
|
const [linkUrl, setLinkUrl] = useState("");
|
||||||
const [isEditMode, setEditMode] = useState(false);
|
const [isEditMode, setEditMode] = useState(false);
|
||||||
const [lastSelection, setLastSelection] = useState(null);
|
const [lastSelection, setLastSelection] = useState(null);
|
||||||
@ -134,9 +133,7 @@ function FloatingLinkEditor({ editor }) {
|
|||||||
rect = domRange.getBoundingClientRect();
|
rect = domRange.getBoundingClientRect();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mouseDownRef.current) {
|
|
||||||
positionEditorElement(editorElem, rect);
|
positionEditorElement(editorElem, rect);
|
||||||
}
|
|
||||||
setLastSelection(selection);
|
setLastSelection(selection);
|
||||||
} else if (!activeElement || activeElement.className !== "link-input") {
|
} else if (!activeElement || activeElement.className !== "link-input") {
|
||||||
positionEditorElement(editorElem, null);
|
positionEditorElement(editorElem, null);
|
||||||
|
Loading…
Reference in New Issue
Block a user