Commit 6599b706 authored by rlanvin's avatar rlanvin

Don't steal focus when the chatbox opens automatically

- Adding a new parameter "focus" to ChatBoxView.show
- Removing the parameter "callback" not used
parent 76ed0b7b
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment