From fe5ba1cce7e3d6e3e9d6b051cc9d61d416580ca0 Mon Sep 17 00:00:00 2001 From: Abdo Date: Fri, 19 Jan 2024 09:06:27 +0300 Subject: [PATCH] Fix MathJax editor not opening when navigating into blocks (#2953) --- ts/editable/frame-element.ts | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/ts/editable/frame-element.ts b/ts/editable/frame-element.ts index 6f4644cb5..1e033b02d 100644 --- a/ts/editable/frame-element.ts +++ b/ts/editable/frame-element.ts @@ -59,7 +59,7 @@ function restoreFrameHandles(mutations: MutationRecord[]): void { continue; } - if (frameElement.isConnected && !frameElement.block) { + if (frameElement.isConnected) { frameElement.refreshHandles(); continue; } @@ -114,13 +114,7 @@ export class FrameElement extends HTMLElement { case "block": this.block = newValue !== "false"; - - if (!this.block) { - this.refreshHandles(); - } else { - this.removeHandles(); - } - + this.refreshHandles(); break; } } @@ -152,14 +146,6 @@ export class FrameElement extends HTMLElement { } } - removeHandles(): void { - this.handleStart?.remove(); - this.handleStart = undefined; - - this.handleEnd?.remove(); - this.handleEnd = undefined; - } - removeStart?: () => void; removeEnd?: () => void;