Wall: Add ability to send posts and comments by Ctrl + Enter

Closes #67
This commit is contained in:
Maxim Leshchenko 2022-04-17 20:36:34 +02:00
parent d71613d47c
commit f80f8f09cc
No known key found for this signature in database
GPG key ID: BB9C44A8733FBEEE

View file

@ -117,3 +117,8 @@ function setupWallPostInputHandlers(id) {
// textArea.style.height = (newHeight > originalHeight ? (newHeight + boost) : originalHeight) + "px";
});
}
u("#write > form").on("keydown", function(event) {
if(event.ctrlKey && event.keyCode === 13)
this.submit();
});