diff --git a/app/src/boot/globalEvent/command/panel.ts b/app/src/boot/globalEvent/command/panel.ts
index 16e76d0ac..fb866502f 100644
--- a/app/src/boot/globalEvent/command/panel.ts
+++ b/app/src/boot/globalEvent/command/panel.ts
@@ -77,16 +77,17 @@ export const commandPanel = (app: App) => {
plugin.commands.forEach(command => {
const liElement = document.createElement("li");
liElement.classList.add("b3-list-item");
- liElement.dataset.command = command.langKey;
liElement.innerHTML = `${plugin.displayName}: ${command.langText || plugin.i18n[command.langKey]}
${updateHotkeyTip(command.customHotkey)}`;
- liElement.addEventListener("click", () => {
+ liElement.addEventListener("click", (event) => {
if (command.callback) {
command.callback();
} else if (command.globalCallback) {
command.globalCallback();
}
dialog.destroy();
+ event.preventDefault();
+ event.stopPropagation();
});
listElement.insertAdjacentElement("beforeend", liElement);
});