mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-05 15:12:32 -06:00
Add Web UI support for escape key
This commit is contained in:
@@ -11,16 +11,23 @@
|
||||
'use strict';
|
||||
|
||||
window.addEvent('domready', function() {
|
||||
var setLocationKeyboardEvents = new Keyboard({
|
||||
new Keyboard({
|
||||
defaultEventType: 'keydown',
|
||||
events: {
|
||||
'enter': function(event) {
|
||||
$('editTrackerButton').click();
|
||||
event.preventDefault();
|
||||
},
|
||||
'Escape': function(event) {
|
||||
window.parent.closeWindows();
|
||||
event.preventDefault();
|
||||
},
|
||||
'Esc': function(event) {
|
||||
window.parent.closeWindows();
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
});
|
||||
setLocationKeyboardEvents.activate();
|
||||
}).activate();
|
||||
|
||||
var currentUrl = new URI().getData('url');
|
||||
if (!currentUrl)
|
||||
|
||||
Reference in New Issue
Block a user