From 3a6fc979c4c08b360101b6b0b1ad465acf163f6f Mon Sep 17 00:00:00 2001
From: chris <kokosias@yahoo.gr>
Date: Sat, 18 Mar 2023 10:47:33 +0200
Subject: [PATCH] fix waxView mounted

---
 wax-prosemirror-core/src/WaxView.js | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/wax-prosemirror-core/src/WaxView.js b/wax-prosemirror-core/src/WaxView.js
index 2a87afd2a..8eab7d26a 100644
--- a/wax-prosemirror-core/src/WaxView.js
+++ b/wax-prosemirror-core/src/WaxView.js
@@ -44,7 +44,6 @@ const WaxView = forwardRef((props, ref) => {
     scrollThreshold,
   } = props;
 
-  const [mounted, setMounted] = useState(false);
   const context = useContext(WaxContext);
   const { createPortal } = useContext(PortalContext);
 
@@ -55,11 +54,9 @@ const WaxView = forwardRef((props, ref) => {
   const setEditorRef = useCallback(
     node => {
       if (node) {
-        if (!mounted) {
-          context.app.bootServices();
-          context.app.getShortCuts();
-          context.app.getRules();
-        }
+        context.app.bootServices();
+        context.app.getShortCuts();
+        context.app.getRules();
 
         const options = WaxOptions({
           ...props,
@@ -84,8 +81,6 @@ const WaxView = forwardRef((props, ref) => {
           },
         );
 
-        setMounted(true);
-
         context.updateView(
           {
             main: view,
-- 
GitLab