chat-app icon indicating copy to clipboard operation
chat-app copied to clipboard

Improvement: could the message textbox get the focus again after the message is sent?

Open fender0ne opened this issue 6 years ago • 1 comments

Improvement: could the message textbox regain the focus after the message is sent (in case the send btn is clicked)?

You could use something like the following:

let messageTextbox = jQuery('[name=message]')
...
socket.emit('createMessage', DATA, function(err, server_msg) { // Ack.
  if (!err) {
    messageTextbox.val('') // Clear the message input text
  }
  messageTextbox.focus()
})
...

fender0ne avatar Feb 10 '19 12:02 fender0ne

@fenderOne thanks for your suggestion, I'll fix that when I have time :wink:

ivan3123708 avatar Apr 22 '19 11:04 ivan3123708