Keep scroll position on minimize/maximize

This commit is contained in:
rlanvin 2016-02-14 18:05:59 +02:00
parent fae4f36886
commit 1d005a5612
2 changed files with 4 additions and 0 deletions

View File

@ -2037,6 +2037,7 @@
*/
chatboxviews.trimChats(this);
converse.refreshWebkit();
this.$content.scrollTop(this.model.get('scroll'));
this.setChatState(ACTIVE).focus();
converse.emit('chatBoxMaximized', this);
}.bind(this));
@ -2044,6 +2045,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);

View File

@ -4,6 +4,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]
## 0.10.1 (2016-02-06)