Fixed UI/UX bug with pressing tab or enter on url input field
This commit is contained in:
parent
cd574192bf
commit
9bbfb420f9
2 changed files with 20 additions and 10 deletions
File diff suppressed because one or more lines are too long
|
@ -75,10 +75,20 @@ const bytesToSize = (bytes) => {
|
||||||
/* MAIN */
|
/* MAIN */
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
importInput.addEventListener("keyup", (e) => {
|
importInput.addEventListener("keypress", (e) => {
|
||||||
if (e.keyCode === 13) {
|
if (e.keyCode == 9) {
|
||||||
|
urlSelected();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (e.keyCode === 13 || e.keyCode == 10) {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
urlSelected();
|
||||||
importButton.click();
|
importButton.click();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, false)
|
}, false)
|
||||||
|
|
Loading…
Reference in a new issue