Skip to content

Commit

Permalink
fix: 自定义下拉菜单对应输入窗口焦点失焦问题
Browse files Browse the repository at this point in the history
  • Loading branch information
l0o0 committed Dec 26, 2023
1 parent 14a99ac commit e261a5f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/modules/preferenceScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,12 @@ export async function refreshTable() {
function updateMenu(e: Event, prefName: string) {
const menuValue = (e.target as HTMLInputElement).value;
const inputField = addon.data.prefs!.window.document.querySelector(
`#jasminum0${prefName}-input`
`#jasminum-${prefName}-input`
) as HTMLInputElement;
if (menuValue) {
// 选中候选选项
setPref(prefName, menuValue);
} else {
inputField.value = "";
inputField.focus();
}
}
Expand Down

0 comments on commit e261a5f

Please sign in to comment.