From 48b558bb5dd5254673b7e21df32c1aa35836ed3e Mon Sep 17 00:00:00 2001 From: Aman Harwara Date: Sat, 14 Sep 2024 15:12:37 +0530 Subject: [PATCH] fix: Fixed issue with embedded note links getting deselected after first click --- .../Components/SuperEditor/Plugins/CheckListPlugin.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/web/src/javascripts/Components/SuperEditor/Plugins/CheckListPlugin.tsx b/packages/web/src/javascripts/Components/SuperEditor/Plugins/CheckListPlugin.tsx index 6b7f388fb..a0ddfe704 100644 --- a/packages/web/src/javascripts/Components/SuperEditor/Plugins/CheckListPlugin.tsx +++ b/packages/web/src/javascripts/Components/SuperEditor/Plugins/CheckListPlugin.tsx @@ -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)