zhuliu 1 年之前
父节点
当前提交
f5e31472d8
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/utils/model/RichText/index.vue

+ 2 - 0
src/utils/model/RichText/index.vue

@@ -85,6 +85,7 @@ export default {
         event.preventDefault(); // 取消默认的右击菜单显示行为
         that.showCustomMenu(event)
     });
+    this.setFocus()
     // 当点击任意地方或者按下ESC键时,隐藏菜单
     // window.onclick = this.hideCustomMenu
     window.addEventListener('click',function(event){
@@ -196,6 +197,7 @@ export default {
           customMenu.style.display = "none";
       }
       if (e.keyCode === 13) {
+        return
           e.preventDefault(); // 阻止默认操作
           document.execCommand("insertHTML", false, "<br><br>"); // 插入换行
       }