|
@@ -1739,6 +1739,7 @@
|
|
|
*/
|
|
|
chatboxviews.trimChats(this);
|
|
|
converse.refreshWebkit();
|
|
|
+ this.$content.scrollTop(this.model.get('scroll'));
|
|
|
this.setChatState(ACTIVE).focus();
|
|
|
converse.emit('chatBoxMaximized', this);
|
|
|
}.bind(this));
|
|
@@ -1746,6 +1747,8 @@
|
|
|
|
|
|
minimize: function (ev) {
|
|
|
if (ev && ev.preventDefault) { ev.preventDefault(); }
|
|
|
+ // save the scroll position to restore it on maximize
|
|
|
+ this.model.save({'scroll': this.$content.scrollTop()});
|
|
|
// Minimizes a chat box
|
|
|
this.setChatState(INACTIVE).model.minimize();
|
|
|
this.$el.hide('fast', converse.refreshwebkit);
|
|
@@ -1834,7 +1837,7 @@
|
|
|
return this;
|
|
|
},
|
|
|
|
|
|
- show: _.debounce(function (callback) {
|
|
|
+ show: _.debounce(function (focus) {
|
|
|
if (this.$el.is(':visible') && this.$el.css('opacity') === "1") {
|
|
|
if (focus) { this.focus(); }
|
|
|
return this;
|