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 */
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
importInput.addEventListener("keyup", (e) => {
|
||||
if (e.keyCode === 13) {
|
||||
importInput.addEventListener("keypress", (e) => {
|
||||
if (e.keyCode == 9) {
|
||||
urlSelected();
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.keyCode === 13 || e.keyCode == 10) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
urlSelected();
|
||||
importButton.click();
|
||||
return;
|
||||
}
|
||||
});
|
||||
}, false)
|
||||
|
|
Loading…
Reference in a new issue