1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 23:37:59 +00:00

Fix bug where input wouldn't always be focused

This commit is contained in:
Thomas Piccirello 2019-01-10 15:49:59 -08:00
parent 74a772aafb
commit 2f33ecf37b

View File

@ -35,10 +35,7 @@
var uriCategoryName = safeTrim(new URI().getData('categoryName'));
var uriSavePath = safeTrim(new URI().getData('savePath'));
if (uriAction === "create") {
$('categoryName').focus();
}
else if (uriAction === "edit") {
if (uriAction === "edit") {
if (!uriCategoryName)
return false;
@ -47,6 +44,9 @@
$('savePath').set('value', escapeHtml(uriSavePath));
$('savePath').focus();
}
else {
$('categoryName').focus();
}
$('categoryNameButton').addEvent('click', function(e) {
new Event(e).stop();