Skip to content

Commit

Permalink
🎨 #11511
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed May 23, 2024
1 parent f10c0bc commit 56eeedc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/src/config/keymap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export const keymap = {
keymap.element.querySelectorAll("#keymapList .b3-list-item--hide-action > .b3-list-item__text").forEach(item => {
const liElement = item.parentElement;
let matchedKeymap = false;
if (keymapString === "" || (liElement.querySelector(".b3-text-field") as HTMLInputElement).value.indexOf(updateHotkeyTip(keymapString)) > -1) {
if (keymapString === "" || liElement.querySelector(".b3-text-field").getAttribute("data-value").indexOf(keymapString) > -1) {
matchedKeymap = true;
}
if ((item.textContent.toLowerCase().indexOf(value.toLowerCase()) > -1 || value.toLowerCase().indexOf(item.textContent.toLowerCase()) > -1 || value === "") && matchedKeymap) {
Expand Down Expand Up @@ -298,13 +298,13 @@ export const keymap = {
const searchElement = keymap.element.querySelector("#keymapInput") as HTMLInputElement;
const searchKeymapElement = keymap.element.querySelector("#searchByKey") as HTMLInputElement;
searchElement.addEventListener("compositionend", () => {
keymap.search(searchElement.value, searchKeymapElement.value);
keymap.search(searchElement.value, searchKeymapElement.dataset.value);
});
searchElement.addEventListener("input", (event: InputEvent) => {
if (event.isComposing) {
return;
}
keymap.search(searchElement.value, searchKeymapElement.value);
keymap.search(searchElement.value, searchKeymapElement.dataset.value);
});
/// #if !BROWSER
searchKeymapElement.addEventListener("focus", () => {
Expand All @@ -325,6 +325,7 @@ export const keymap = {
setTimeout(() => {
this.value = updateHotkeyTip(keymapStr);
});
this.dataset.keymap = keymapStr;
keymap.search(searchElement.value, keymapStr);
});
keymap.element.querySelector("#clearSearchBtn").addEventListener("click", () => {
Expand Down

0 comments on commit 56eeedc

Please sign in to comment.