Explorar o código

Update textWysiwyg.tsx

zsviczian %!s(int64=3) %!d(string=hai) anos
pai
achega
d969849357
Modificáronse 1 ficheiros con 6 adicións e 6 borrados
  1. 6 6
      src/element/textWysiwyg.tsx

+ 6 - 6
src/element/textWysiwyg.tsx

@@ -543,12 +543,12 @@ export const textWysiwyg = ({
       isWritableElement(target);
  
     const isShapeActionsPanel =
-      (event.target instanceof HTMLElement ||
-        event.target instanceof SVGElement) &&
-      (event.target.closest(`.${CLASSES.SHAPE_ACTIONS_MENU}`) ||
-        event.target.closest(`.${CLASSES.SHAPE_ACTIONS_MOBILE_MENU}`) ||
-        event.target.closest(`.${CLASSES.MOBILE_TOOLBAR}`)) &&
-      !isWritableElement(event.target);
+      (target instanceof HTMLElement ||
+        target instanceof SVGElement) &&
+      (target.closest(`.${CLASSES.SHAPE_ACTIONS_MENU}`) ||
+        target.closest(`.${CLASSES.SHAPE_ACTIONS_MOBILE_MENU}`) ||
+        target.closest(`.${CLASSES.MOBILE_TOOLBAR}`)) &&
+      !isWritableElement(target);
 
     setTimeout(() => {
       editable.onblur = () => {