Když už jsem u toho, tak event.keyCode -> event.code

This commit is contained in:
Jonas Havelka 2025-01-21 13:01:57 +01:00
parent 5f904b5c66
commit 2c627b3d60

View file

@ -27,7 +27,7 @@
// ctrl-enter submits form
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