Keep scroll position on minimize/maximize
This commit is contained in:
parent
fae4f36886
commit
1d005a5612
@ -2037,6 +2037,7 @@
|
|||||||
*/
|
*/
|
||||||
chatboxviews.trimChats(this);
|
chatboxviews.trimChats(this);
|
||||||
converse.refreshWebkit();
|
converse.refreshWebkit();
|
||||||
|
this.$content.scrollTop(this.model.get('scroll'));
|
||||||
this.setChatState(ACTIVE).focus();
|
this.setChatState(ACTIVE).focus();
|
||||||
converse.emit('chatBoxMaximized', this);
|
converse.emit('chatBoxMaximized', this);
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
@ -2044,6 +2045,8 @@
|
|||||||
|
|
||||||
minimize: function (ev) {
|
minimize: function (ev) {
|
||||||
if (ev && ev.preventDefault) { ev.preventDefault(); }
|
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
|
// Minimizes a chat box
|
||||||
this.setChatState(INACTIVE).model.minimize();
|
this.setChatState(INACTIVE).model.minimize();
|
||||||
this.$el.hide('fast', converse.refreshwebkit);
|
this.$el.hide('fast', converse.refreshwebkit);
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
- #261 show_controlbox_by_default config not working [diditopher]
|
- #261 show_controlbox_by_default config not working [diditopher]
|
||||||
- #573 xgettext build error: `'javascript' unknown`
|
- #573 xgettext build error: `'javascript' unknown`
|
||||||
|
- Save scroll position on minimize and restore it on maximize [rlanvin]
|
||||||
|
|
||||||
## 0.10.1 (2016-02-06)
|
## 0.10.1 (2016-02-06)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user