Commit b99cfdde authored by JC Brand's avatar JC Brand

Merge pull request #589 from rlanvin/save-scroll

Keep scroll position on minimize/maximize
parents 94004eaa 1d005a56
......@@ -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);
......
......@@ -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)
......
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