Browse Source

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

Vanessa 1 year ago
parent
commit
6cb59cddc8
2 changed files with 6 additions and 0 deletions
  1. 1 0
      CHANGELOG.md
  2. 5 0
      src/ts/ir/index.ts

+ 1 - 0
CHANGELOG.md

@@ -15,6 +15,7 @@
 
 
 ### v3.10.1 / 2024-01
 ### v3.10.1 / 2024-01
 
 
+* [IR 模式滚动时隐藏代码块语言提示](https://github.com/Vanessa219/vditor/issues/1567) `改进功能`
 * [https://github.com/Vanessa219/vditor/issues/1565](https://github.com/Vanessa219/vditor/pull/1563) `开发重构`
 * [https://github.com/Vanessa219/vditor/issues/1565](https://github.com/Vanessa219/vditor/pull/1563) `开发重构`
 * [⬆️ Bump ip from 1.1.5 to 1.1.9](https://github.com/Vanessa219/vditor/pull/1563) `开发重构`
 * [⬆️ Bump ip from 1.1.5 to 1.1.9](https://github.com/Vanessa219/vditor/pull/1563) `开发重构`
 * [WYSIWYG 模式下链接包含粗体无法打开](https://github.com/Vanessa219/vditor/issues/1560) `改进功能`
 * [WYSIWYG 模式下链接包含粗体无法打开](https://github.com/Vanessa219/vditor/issues/1560) `改进功能`

+ 5 - 0
src/ts/ir/index.ts

@@ -20,6 +20,7 @@ import {expandMarker} from "./expandMarker";
 import {highlightToolbarIR} from "./highlightToolbarIR";
 import {highlightToolbarIR} from "./highlightToolbarIR";
 import {input} from "./input";
 import {input} from "./input";
 import {processAfterRender, processHint} from "./process";
 import {processAfterRender, processHint} from "./process";
+import {hidePanel} from "../toolbar/setToolbar";
 
 
 class IR {
 class IR {
     public range: Range;
     public range: Range;
@@ -74,6 +75,10 @@ class IR {
             });
             });
         });
         });
 
 
+        this.element.addEventListener("scroll", () => {
+            hidePanel(vditor, ["hint"]);
+        });
+
         this.element.addEventListener("compositionstart", (event: InputEvent) => {
         this.element.addEventListener("compositionstart", (event: InputEvent) => {
             this.composingLock = true;
             this.composingLock = true;
         });
         });