Browse Source

Allow sending messages on mobile using the Enter key with the combination of Shift (usefull when you're in mobile mode on desktop)

pull/531/merge
Timothée Jaussoin 8 years ago
parent
commit
980dafa492
  1. 5
      app/widgets/Chat/chat.js

5
app/widgets/Chat/chat.js

@ -181,10 +181,11 @@ var Chat = {
textarea.onkeypress = function(event) {
if(event.keyCode == 13) {
if(window.matchMedia("(max-width: 1024px)").matches
|| event.shiftKey) {
if((window.matchMedia("(max-width: 1024px)").matches && !event.shiftKey)
|| (window.matchMedia("(min-width: 1025px)").matches && event.shiftKey)) {
return;
}
Chat.state = 0;
Chat.sendMessage();

Loading…
Cancel
Save