fix: Fixed issue with embedded note links getting deselected after first click

This commit is contained in:
Aman Harwara
2024-09-14 15:12:37 +05:30
parent f2b5ab76d9
commit 48b558bb5d

View File

@@ -47,14 +47,14 @@ export function CheckListPlugin(): null {
return
}
editor.getRootElement()?.focus()
const parentNode = target.parentNode
// @ts-expect-error internal field
if (!parentNode || parentNode.__lexicalListType !== 'check') {
return
}
editor.getRootElement()?.focus()
const rect = target.getBoundingClientRect()
const listItemElementStyles = getComputedStyle(target)