mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
This commit is contained in:
parent
f2d99e0867
commit
d615ddaa97
1 changed files with 3 additions and 3 deletions
|
|
@ -143,7 +143,7 @@ export const keymap = {
|
||||||
<div class="fn__space"></div>
|
<div class="fn__space"></div>
|
||||||
<label class="b3-form__icon fn__block searchByKeyLabel">
|
<label class="b3-form__icon fn__block searchByKeyLabel">
|
||||||
<svg class="b3-form__icon-icon"><use xlink:href="#iconKeymap"></use></svg>
|
<svg class="b3-form__icon-icon"><use xlink:href="#iconKeymap"></use></svg>
|
||||||
<input id="searchByKey" data-value="" class="b3-form__icon-input b3-text-field fn__block" spellcheck="false" placeholder="${window.siyuan.languages.keymap}">
|
<input id="searchByKey" data-keymap="" class="b3-form__icon-input b3-text-field fn__block" spellcheck="false" placeholder="${window.siyuan.languages.keymap}">
|
||||||
</label>
|
</label>
|
||||||
<div class="fn__space"></div>
|
<div class="fn__space"></div>
|
||||||
<button id="clearSearchBtn" class="b3-button b3-button--outline fn__flex-center fn__size200">
|
<button id="clearSearchBtn" class="b3-button b3-button--outline fn__flex-center fn__size200">
|
||||||
|
|
@ -337,13 +337,13 @@ export const keymap = {
|
||||||
const searchElement = keymap.element.querySelector("#keymapInput") as HTMLInputElement;
|
const searchElement = keymap.element.querySelector("#keymapInput") as HTMLInputElement;
|
||||||
const searchKeymapElement = keymap.element.querySelector("#searchByKey") as HTMLInputElement;
|
const searchKeymapElement = keymap.element.querySelector("#searchByKey") as HTMLInputElement;
|
||||||
searchElement.addEventListener("compositionend", () => {
|
searchElement.addEventListener("compositionend", () => {
|
||||||
keymap.search(searchElement.value, searchKeymapElement.dataset.value);
|
keymap.search(searchElement.value, searchKeymapElement.dataset.keymap);
|
||||||
});
|
});
|
||||||
searchElement.addEventListener("input", (event: InputEvent) => {
|
searchElement.addEventListener("input", (event: InputEvent) => {
|
||||||
if (event.isComposing) {
|
if (event.isComposing) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
keymap.search(searchElement.value, searchKeymapElement.dataset.value);
|
keymap.search(searchElement.value, searchKeymapElement.dataset.keymap);
|
||||||
});
|
});
|
||||||
/// #if !BROWSER
|
/// #if !BROWSER
|
||||||
searchKeymapElement.addEventListener("focus", () => {
|
searchKeymapElement.addEventListener("focus", () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue