Když už jsem u toho, tak event.keyCode -> event.code
This commit is contained in:
parent
5f904b5c66
commit
2c627b3d60
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
// ctrl-enter submits form
|
// ctrl-enter submits form
|
||||||
commform._text.addEventListener("keydown", ev => {
|
commform._text.addEventListener("keydown", ev => {
|
||||||
if( (ev.keyCode == 13 || ev.keyCode == 10 ) && ev.ctrlKey ) commform.submit();
|
if (ev.code === "Enter" && ev.ctrlKey) commform.submit();
|
||||||
});
|
});
|
||||||
|
|
||||||
//hide comment form
|
//hide comment form
|
||||||
|
|
Loading…
Reference in a new issue