mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-20 02:50:58 +08:00
This commit is contained in:
parent
9c367dc79e
commit
6bfdaf35e4
@ -5,6 +5,7 @@ import {updateHotkeyTip} from "../util/compatibility";
|
||||
import {hasClosestByClassName} from "../util/hasClosest";
|
||||
import {goEnd, goHome} from "../wysiwyg/commonHotkey";
|
||||
import {isMobile} from "../../util/functions";
|
||||
import {showTooltip} from "../../dialog/tooltip";
|
||||
|
||||
export class Scroll {
|
||||
public element: HTMLElement;
|
||||
@ -38,6 +39,7 @@ export class Scroll {
|
||||
this.inputElement = this.element.firstElementChild as HTMLInputElement;
|
||||
this.inputElement.addEventListener("input", () => {
|
||||
this.element.setAttribute("aria-label", `Blocks ${this.inputElement.value}/${protyle.block.blockCount}`);
|
||||
showTooltip(this.element.getAttribute("aria-label"), this.element);
|
||||
});
|
||||
/// #if BROWSER
|
||||
this.inputElement.addEventListener("change", () => {
|
||||
@ -74,6 +76,9 @@ export class Scroll {
|
||||
data: getResponse,
|
||||
protyle,
|
||||
action: [Constants.CB_GET_FOCUSFIRST, Constants.CB_GET_UNCHANGEID],
|
||||
afterCB: () => {
|
||||
showTooltip(this.element.getAttribute("aria-label"), this.element);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user