editor: fix variable shadowing in let causing use before declaration
This commit is contained in:
parent
02520f6b2d
commit
15ce72b72d
|
@ -25,14 +25,14 @@ ta.addEventListener('keydown', function(e) {
|
|||
e.target.selectionEnd = start + 1;
|
||||
}
|
||||
if (e.ctrlKey && keyCode == 13) {
|
||||
let e = e.target;
|
||||
while(! (e instanceof HTMLFormElement)) {
|
||||
e = e.parentNode;
|
||||
let t = e.target;
|
||||
while(! (t instanceof HTMLFormElement)) {
|
||||
t = t.parentNode;
|
||||
}
|
||||
try {
|
||||
e.submit();
|
||||
t.submit();
|
||||
} catch(exception) {
|
||||
e.submit.click();
|
||||
t.submit.click();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue