Przeglądaj źródła

:art: fix https://github.com/Vanessa219/vditor/issues/1391

Vanessa 2 lat temu
rodzic
commit
dd89bde0f6
2 zmienionych plików z 3 dodań i 0 usunięć
  1. 1 0
      CHANGELOG.md
  2. 2 0
      src/ts/toolbar/Headings.ts

+ 1 - 0
CHANGELOG.md

@@ -108,6 +108,7 @@
 
 ### v3.9.3 / 2023-05
 
+* [输入内容后立即点击工具栏下拉无反应](https://github.com/Vanessa219/vditor/issues/1391) `改进功能`
 * [XSS 代码注入漏洞](https://github.com/Vanessa219/vditor/issues/1395) `修复缺陷`
 * [支持葡萄牙语](https://github.com/Vanessa219/vditor/pull/1394) `引入特性`
 

+ 2 - 0
src/ts/toolbar/Headings.ts

@@ -31,6 +31,8 @@ export class Headings extends MenuItem {
         const actionBtn = this.element.children[0] as HTMLElement;
         actionBtn.addEventListener(getEventName(), (event) => {
             event.preventDefault();
+            // https://github.com/Vanessa219/vditor/issues/1391
+            clearTimeout(vditor.wysiwyg.afterRenderTimeoutId);
             if (actionBtn.classList.contains(Constants.CLASS_MENU_DISABLED)) {
                 return;
             }