send by enter by default
This commit is contained in:
parent
4b54f5919a
commit
a4f637eda0
1 changed files with 2 additions and 1 deletions
3
main.js
3
main.js
|
@ -15,7 +15,8 @@ if (document.querySelector('.modal__form-submit')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
document.querySelector('.form__input-message').addEventListener('keydown', function (e) {
|
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()
|
document.querySelector('.form__input-submit').click()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue