Focus tag input field if tagsBox doesn't have tags

Fixes #2315
This commit is contained in:
Martynas Bagdonas 2022-01-31 19:44:13 +02:00
parent cec1f18670
commit 21ca1555c1
2 changed files with 8 additions and 1 deletions

View file

@ -782,7 +782,11 @@
}
var row = this.addDynamicRow();
row.firstChild.nextSibling.click();
// It needs relatively high delay to make focus-on-click work
setTimeout(() => {
row.firstChild.nextSibling.click();
}, 50);
return row;
]]>
</body>

View file

@ -376,6 +376,9 @@ class ReaderInstance {
menupopup.openPopupAtScreen(x, y, false);
tagsbox.mode = 'edit';
tagsbox.item = item;
if (tagsbox.mode == 'edit' && tagsbox.count == 0) {
tagsbox.newTag();
}
}
_openPagePopup(data) {