mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 22:03:27 -07:00
WebUI: Allow closing modals with Escape
Closes [#13891](https://github.com/qbittorrent/qBittorrent/issues/13891)
This commit is contained in:
parent
71af105a89
commit
40e39367f6
1 changed files with 9 additions and 0 deletions
|
@ -1773,6 +1773,15 @@ window.addEventListener("DOMContentLoaded", (event) => {
|
|||
event.preventDefault();
|
||||
deleteSelectedTorrentsFN(event.shiftKey);
|
||||
break;
|
||||
|
||||
case "Escape":
|
||||
if (event.target.isContentEditable)
|
||||
return;
|
||||
event.preventDefault();
|
||||
Object.values(MochaUI.Windows.instances).forEach((modal) => {
|
||||
modal.close();
|
||||
});
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue