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',
|
'keydown #message-input': 'messageKeyDown',
|
||||||
'keyup #message-input': 'checkUserTyping',
|
'keyup #message-input': 'checkUserTyping',
|
||||||
'change #message-input': 'checkUserTyping',
|
'change #message-input': 'checkUserTyping',
|
||||||
'change #predefined': 'selectPredefinedAnswer',
|
'change #predefined': 'selectPredefinedAnswer'
|
||||||
'focus #message-input': 'setFocus',
|
|
||||||
'blur #message-input': 'dropFocus'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -149,9 +147,8 @@
|
|||||||
postMessageComplete: function() {
|
postMessageComplete: function() {
|
||||||
this.clearInput();
|
this.clearInput();
|
||||||
this.enableInput();
|
this.enableInput();
|
||||||
if (this.focused) {
|
// Always set focus on message input after message sent
|
||||||
this.ui.message.focus();
|
this.ui.message.focus();
|
||||||
}
|
|
||||||
Mibew.Objects.Collections.messages.off(
|
Mibew.Objects.Collections.messages.off(
|
||||||
'multiple:add',
|
'multiple:add',
|
||||||
this.postMessageComplete,
|
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.
|
* Builds a string with send shortcut.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user