소스 검색

Update textWysiwyg.tsx

zsviczian 3 년 전
부모
커밋
9a66fc6c05
1개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. 11 0
      src/element/textWysiwyg.tsx

+ 11 - 0
src/element/textWysiwyg.tsx

@@ -541,9 +541,20 @@ export const textWysiwyg = ({
       target instanceof HTMLInputElement &&
       target.closest(".color-picker-input") &&
       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);
 
     setTimeout(() => {
       editable.onblur = () => {
+        if (isShapeActionsPanel) {
+          return;
+        }
         app.setState({
           toastMessage: "debug: onblur",
         });