Fix MathJax editor not opening when navigating into blocks (#2953)

This commit is contained in:
Abdo 2024-01-19 09:06:27 +03:00 committed by GitHub
parent f480ecea0c
commit fe5ba1cce7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,7 +59,7 @@ function restoreFrameHandles(mutations: MutationRecord[]): void {
continue; continue;
} }
if (frameElement.isConnected && !frameElement.block) { if (frameElement.isConnected) {
frameElement.refreshHandles(); frameElement.refreshHandles();
continue; continue;
} }
@ -114,13 +114,7 @@ export class FrameElement extends HTMLElement {
case "block": case "block":
this.block = newValue !== "false"; this.block = newValue !== "false";
this.refreshHandles();
if (!this.block) {
this.refreshHandles();
} else {
this.removeHandles();
}
break; 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; removeStart?: () => void;
removeEnd?: () => void; removeEnd?: () => void;