瀏覽代碼

Update textWysiwyg.tsx

zsviczian 3 年之前
父節點
當前提交
ce27cb6159
共有 1 個文件被更改,包括 7 次插入2 次删除
  1. 7 2
      src/element/textWysiwyg.tsx

+ 7 - 2
src/element/textWysiwyg.tsx

@@ -543,7 +543,12 @@ export const textWysiwyg = ({
       isWritableElement(target);
       isWritableElement(target);
 
 
     setTimeout(() => {
     setTimeout(() => {
-      editable.onblur = handleSubmit;
+      editable.onblur = () => {
+        app.setState({
+          toastMessage: "debug: onblur",
+        });  
+        handleSubmit();
+      };
       if (target && isTargetColorPicker) {
       if (target && isTargetColorPicker) {
         target.onblur = () => {
         target.onblur = () => {
           editable.focus();
           editable.focus();
@@ -576,7 +581,7 @@ export const textWysiwyg = ({
       isTargetColorPicker
       isTargetColorPicker
     ) {
     ) {
       app.setState({
       app.setState({
-        toastMessage: "debug",
+        toastMessage: "debug: onPointerDown",
       });
       });
       editable.onblur = null;
       editable.onblur = null;
       window.addEventListener("pointerup", bindBlurEvent);
       window.addEventListener("pointerup", bindBlurEvent);