Skip to content

Commit

Permalink
data-menuid for /menu
Browse files Browse the repository at this point in the history
  • Loading branch information
TCOTC committed Sep 24, 2024
1 parent dafb42a commit 34a91cd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/src/protyle/hint/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ ${unicode2Emoji(emoji.unicode)}</button>`;
if (this.splitChar === "/" || this.splitChar === "、") {
clearTimeout(this.timeId);
if (this.enableSlash && !isMobile()) {
this.element.setAttribute("data-menuid", "hintMenu_complete");
this.genHTML(hintSlash(key, protyle), protyle, false, "hint");
}
return;
Expand All @@ -201,6 +202,11 @@ ${unicode2Emoji(emoji.unicode)}</button>`;
if (item.key === this.splitChar) {
clearTimeout(this.timeId);
this.timeId = window.setTimeout(() => {
if (key) {
this.element.setAttribute("data-menuid", "hintMenu_filtered");
} else {
this.element.setAttribute("data-menuid", "hintMenu_complete");
}
this.genHTML(item.hint(key, protyle, "hint"), protyle, false, "hint");
}, protyle.options.hint.delay);
}
Expand Down

0 comments on commit 34a91cd

Please sign in to comment.