Don't steal focus when the chatbox opens automatically
- Adding a new parameter "focus" to ChatBoxView.show - Removing the parameter "callback" not used
This commit is contained in:
parent
76ed0b7b85
commit
6599b70602
12
converse.js
12
converse.js
@ -2174,22 +2174,22 @@
|
||||
return this;
|
||||
},
|
||||
|
||||
show: function (callback) {
|
||||
show: function (focus) {
|
||||
if (this.$el.is(':visible') && this.$el.css('opacity') === "1") {
|
||||
return this.focus();
|
||||
}
|
||||
this.initDragResize().setDimensions();
|
||||
this.$el.fadeIn(function () {
|
||||
if (typeof callback === "function") {
|
||||
callback.apply(this, arguments);
|
||||
}
|
||||
if (converse.connection.connected) {
|
||||
// Without a connection, we haven't yet initialized
|
||||
// localstorage
|
||||
this.model.save();
|
||||
}
|
||||
this.setChatState(ACTIVE);
|
||||
this.scrollDown().focus();
|
||||
this.scrollDown();
|
||||
if ( focus ) {
|
||||
this.focus();
|
||||
}
|
||||
}.bind(this));
|
||||
return this;
|
||||
},
|
||||
@ -3923,7 +3923,7 @@
|
||||
if (chatbox.get('minimized')) {
|
||||
chatbox.maximize();
|
||||
} else {
|
||||
chatbox.trigger('show');
|
||||
chatbox.trigger('show', true);
|
||||
}
|
||||
return chatbox;
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
- #261 show_controlbox_by_default config not working [diditopher]
|
||||
- #573 xgettext build error: `'javascript' unknown`
|
||||
- Save scroll position on minimize and restore it on maximize [rlanvin]
|
||||
- #566 Do not steal the focus when the chatbox opens automatically [rlanvin]
|
||||
|
||||
## 0.10.1 (2016-02-06)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user