mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-31 13:24:41 +03:00
parent
397786991d
commit
3fbc5fa262
@ -40,9 +40,7 @@
|
||||
'keydown #message-input': 'messageKeyDown',
|
||||
'keyup #message-input': 'checkUserTyping',
|
||||
'change #message-input': 'checkUserTyping',
|
||||
'change #predefined': 'selectPredefinedAnswer',
|
||||
'focus #message-input': 'setFocus',
|
||||
'blur #message-input': 'dropFocus'
|
||||
'change #predefined': 'selectPredefinedAnswer'
|
||||
},
|
||||
|
||||
/**
|
||||
@ -149,9 +147,8 @@
|
||||
postMessageComplete: function() {
|
||||
this.clearInput();
|
||||
this.enableInput();
|
||||
if (this.focused) {
|
||||
// Always set focus on message input after message sent
|
||||
this.ui.message.focus();
|
||||
}
|
||||
Mibew.Objects.Collections.messages.off(
|
||||
'multiple:add',
|
||||
this.postMessageComplete,
|
||||
@ -193,20 +190,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Set focus indicator
|
||||
*/
|
||||
setFocus: function() {
|
||||
this.focused = true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Unset focus indicator
|
||||
*/
|
||||
dropFocus: function() {
|
||||
this.focused = false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Builds a string with send shortcut.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user