Skip to content

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

@fender0ne

Description

@fender0ne

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()
})
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions