Skip to content

Commit

Permalink
Minor fix for message box focusing (#85)
Browse files Browse the repository at this point in the history
* feature/#62-refresh-send-icon

* feature/#62-refresh-send-icon

* Make fix for input selection more robust (#84)

* use Meteor's internal selector instead of a global jQuery

* Make the focus input event a bit more robust

* Undo accidental cut

* code style

* satisfy esLint
  • Loading branch information
mrsimpson authored and ruKurz committed Aug 24, 2017
1 parent de28c83 commit 8b9c46f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/assistify/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ Meteor.startup(() => {
// Consequently hide the original group
RocketChat.settings.removeById('dbsAI');

RocketChat.settings.addGroup('Assistify', function () {
RocketChat.settings.addGroup('Assistify', function() {

this.add('Assistify_Show_Standard_Features', false, {
i18nLabel: 'Assistify_Show_Standard_Features',
type: 'boolean',
public: true
});

this.section('Knowledge_Base', function () {
this.section('Knowledge_Base', function() {

this.add('DBS_AI_Enabled', false, {
type: 'boolean',
Expand Down
7 changes: 6 additions & 1 deletion packages/rocketchat-ui-message/client/messageBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,12 @@ Template.messageBox.events({
},
'focus .input-message'(event, instance) {
KonchatNotification.removeRoomNotification(this._id);
chatMessages[this._id].input = instance.find('.input-message');
const input = event.target;
chatMessages[this._id].input = input;
if (event.target.value) {
instance.isMessageFieldEmpty.set(false);
return typeof input.updateAutogrow === 'function' && input.updateAutogrow();
}
},
'click .send-button'(event, instance) {
const input = instance.find('.input-message');
Expand Down

0 comments on commit 8b9c46f

Please sign in to comment.