WebUI: use native event listeners for keyboard events

PR #21924.
This commit is contained in:
Chocobo1
2024-12-02 13:41:19 +08:00
committed by GitHub
parent e8d8de8f19
commit 2d1c4fc809
24 changed files with 273 additions and 366 deletions

View File

@@ -18,11 +18,11 @@
$("confirmDeleteTrackerText").textContent = "QBT_TR(Are you sure you want to remove tracker %1 from all torrents?)QBT_TR[CONTEXT=TrackersFilterWidget]".replace("%1", `"${host}"`);
$("cancelBtn").focus();
$("cancelBtn").addEvent("click", (e) => {
$("cancelBtn").addEventListener("click", (e) => {
e.stopPropagation();
window.parent.qBittorrent.Client.closeFrameWindow(window);
});
$("confirmBtn").addEvent("click", (e) => {
$("confirmBtn").addEventListener("click", (e) => {
e.stopPropagation();
const cmd = "api/v2/torrents/removeTrackers";
new Request({