From 3b08b50ce003325666af2a3f9e4fa85f84fab7aa Mon Sep 17 00:00:00 2001 From: gingervitis Date: Sun, 20 Jun 2021 17:15:52 -0700 Subject: [PATCH] add a send button on chat for touch screen devices (#1127) * add a send button on chat for touch screen devices * cleanup --- webroot/js/components/chat/chat-input.js | 44 ++++++++++++++++-------- webroot/styles/app.css | 5 +++ webroot/styles/chat.css | 2 +- 3 files changed, 35 insertions(+), 16 deletions(-) diff --git a/webroot/js/components/chat/chat-input.js b/webroot/js/components/chat/chat-input.js index 5b473b653..86785dd64 100644 --- a/webroot/js/components/chat/chat-input.js +++ b/webroot/js/components/chat/chat-input.js @@ -232,7 +232,7 @@ export default class ChatInput extends Component { }); } - handleMessageInputBlur(event) { + handleMessageInputBlur() { this.prepNewLine = false; this.modifierKeyPressed = false; } @@ -282,7 +282,7 @@ export default class ChatInput extends Component { render(props, state) { const { hasSentFirstChatMessage, inputCharsLeft, inputHTML } = state; - const { inputEnabled, chatDisabled } = props; + const { inputEnabled } = props; const emojiButtonStyle = { display: this.emojiPicker && inputCharsLeft > 0 ? 'block' : 'none', }; @@ -300,7 +300,7 @@ export default class ChatInput extends Component { >
<${ContentEditable} id="message-input" @@ -318,19 +318,33 @@ export default class ChatInput extends Component {
- + + + + + ${inputCharsLeft}/${CHAT_MAX_MESSAGE_LENGTH}