Explorar o código

Update textWysiwyg.tsx

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

+ 5 - 1
src/element/textWysiwyg.tsx

@@ -562,10 +562,14 @@ export const textWysiwyg = ({
       event.target instanceof HTMLInputElement &&
       event.target.closest(".color-picker-input") &&
       isWritableElement(event.target);
+    const isShapeActionsPanel =
+      event.target.closest(`.${CLASSES.SHAPE_ACTIONS_MENU}`) ||
+      event.target.closest(`.${CLASSES.SHAPE_ACTIONS_MOBILE_MENU}`) ||
+      event.target.closest(`.${CLASSES.MOBILE_TOOLBAR}`);
     if (
       ((event.target instanceof HTMLElement ||
         event.target instanceof SVGElement) &&
-        event.target.closest(`.${CLASSES.SHAPE_ACTIONS_MENU}`) &&
+        isShapeActionsPanel &&
         !isWritableElement(event.target)) ||
       isTargetColorPicker
     ) {