mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 16:37:21 -06:00
Merge pull request #10146 from Piccirello/webui-escape-key
Add Web UI support for escape key
This commit is contained in:
@@ -11,16 +11,23 @@
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
var renameKeyboardEvents = new Keyboard({
|
||||
new Keyboard({
|
||||
defaultEventType: 'keydown',
|
||||
events: {
|
||||
'enter': function(event) {
|
||||
'Enter': function(event) {
|
||||
$('renameButton').click();
|
||||
event.preventDefault();
|
||||
},
|
||||
'Escape': function(event) {
|
||||
window.parent.closeWindows();
|
||||
event.preventDefault();
|
||||
},
|
||||
'Esc': function(event) {
|
||||
window.parent.closeWindows();
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
});
|
||||
renameKeyboardEvents.activate();
|
||||
}).activate();
|
||||
|
||||
window.addEvent('domready', function() {
|
||||
var name = new URI().getData('name');
|
||||
|
||||
Reference in New Issue
Block a user