Fixes #1000. Scroll down when maximizing a chat room

This commit is contained in:
JC Brand 2018-01-29 11:40:13 +01:00
parent 0c7b616860
commit e5006b0004
4 changed files with 12 additions and 10 deletions

View File

@ -8,8 +8,13 @@
- #993 `moment.format` is not a function error when sending a message.
- #994 TypeError when using the `user.login` API.
- #995 `ChildNode.replaceWith` is not available in Internet Explorer or Safari. Use `Node.replaceChild` instead.
- #1000 Scroll to bottom when maximizing a chat room.
- #1003 Don't list MUC domain in rooms list.
### Translation changes
- Updated Dutch, French, Japanese, Norwegian Bokmål and Ukrainian translations
## 3.3.1 (2018-01-18)
### UI/UX changes

View File

@ -65,8 +65,8 @@
'discuss@conference.conversejs.org'
],
auto_reconnect: true,
bosh_service_url: 'http://chat.example.org:5280/http-bind/',
// bosh_service_url: 'https://conversejs.org/http-bind/', // Please use this connection manager only for testing purposes
// bosh_service_url: 'http://chat.example.org:5280/http-bind/',
bosh_service_url: 'https://conversejs.org/http-bind/', // Please use this connection manager only for testing purposes
message_archiving: 'always',
show_controlbox_by_default: true,
strict_plugin_dependencies: false,

View File

@ -992,11 +992,7 @@
if (focus) { this.focus(); }
return;
}
const that = this;
u.fadeIn(this.el, function () {
that.afterShown();
if (focus) { that.focus(); }
});
u.fadeIn(this.el, _.bind(this.afterShown, this, focus));
},
show (focus) {

View File

@ -553,7 +553,7 @@
}));
},
afterShown () {
afterShown (focus) {
/* Override from converse-chatview, specifically to avoid
* the 'active' chat state from being sent out prematurely.
*
@ -565,6 +565,8 @@
this.model.save();
}
this.occupantsview.setOccupantsHeight();
this.scrollDown();
if (focus) { this.focus(); }
},
show (focus) {
@ -575,8 +577,7 @@
// Override from converse-chatview in order to not use
// "fadeIn", which causes flashing.
u.showElement(this.el);
this.afterShown();
if (focus) { this.focus(); }
this.afterShown(focus);
},
afterConnected () {