send by enter by default

This commit is contained in:
Tomáš Mládek 2019-11-04 17:56:24 +01:00
parent 4b54f5919a
commit a4f637eda0

View file

@ -15,7 +15,8 @@ if (document.querySelector('.modal__form-submit')) {
}
document.querySelector('.form__input-message').addEventListener('keydown', function (e) {
if (e.ctrlKey && e.keyCode === 13) {
if (!e.ctrlKey && e.keyCode === 13) {
e.preventDefault();
document.querySelector('.form__input-submit').click()
}
});