mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 21:03:30 -07:00
WebUI: Allow closing modals with Escape
Closes [#13891](https://github.com/qbittorrent/qBittorrent/issues/13891)
This commit is contained in:
parent
f5a93be544
commit
f3f524df1e
1 changed files with 9 additions and 1 deletions
|
@ -1774,6 +1774,15 @@ window.addEventListener("DOMContentLoaded", (event) => {
|
|||
deleteSelectedTorrentsFN(event.shiftKey);
|
||||
break;
|
||||
|
||||
case "Escape":
|
||||
if (event.target.isContentEditable)
|
||||
return;
|
||||
event.preventDefault();
|
||||
Object.values(MochaUI.Windows.instances).forEach((modal) => {
|
||||
modal.close();
|
||||
});
|
||||
break;
|
||||
|
||||
case "f":
|
||||
case "F":
|
||||
if (event.ctrlKey || event.metaKey) {
|
||||
|
@ -1798,7 +1807,6 @@ window.addEventListener("DOMContentLoaded", (event) => {
|
|||
torrentsFilterElem.focus();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue