From ca101a6b1899bdeceef8f46a4228d90e43207593 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Wed, 13 Nov 2024 12:49:17 -0500
Subject: made link text use text menu. and made link text zoom with view. 
 cleaned up equationBox updateSize()

---
 src/client/views/nodes/formattedText/EquationEditor.tsx | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

(limited to 'src/client/views/nodes/formattedText/EquationEditor.tsx')

diff --git a/src/client/views/nodes/formattedText/EquationEditor.tsx b/src/client/views/nodes/formattedText/EquationEditor.tsx
index 8bb4a0a26..48efa6e63 100644
--- a/src/client/views/nodes/formattedText/EquationEditor.tsx
+++ b/src/client/views/nodes/formattedText/EquationEditor.tsx
@@ -1,4 +1,3 @@
-/* eslint-disable react/require-default-props */
 import React, { Component, createRef } from 'react';
 
 // Import JQuery, required for the functioning of the equation editor
@@ -7,6 +6,7 @@ import './EquationEditor.scss';
 
 // eslint-disable-next-line @typescript-eslint/no-explicit-any
 (window as any).jQuery = $;
+// eslint-disable-next-line @typescript-eslint/no-require-imports
 require('mathquill/build/mathquill');
 // eslint-disable-next-line @typescript-eslint/no-explicit-any
 (window as any).MathQuill = (window as any).MathQuill.getInterface(1);
@@ -57,13 +57,8 @@ class EquationEditor extends Component<EquationEditorProps> {
         const config = {
             handlers: {
                 edit: () => {
-                    if (this.ignoreEditEvents > 0) {
-                        this.ignoreEditEvents -= 1;
-                        return;
-                    }
-                    if (this.mathField.latex() !== value) {
-                        onChange(this.mathField.latex());
-                    }
+                    if (this.ignoreEditEvents <= 0) onChange(this.mathField.latex());
+                    else this.ignoreEditEvents -= 1;
                 },
                 enter: onEnter,
             },
-- 
cgit v1.2.3-70-g09d2

