mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 14:05:04 +08:00
use RoomView.ScrollToBottom instead of reimplementing it
This commit is contained in:
parent
8aaef34319
commit
f24b7ba67c
@ -129,10 +129,7 @@ module.exports = React.createClass({
|
|||||||
// Call state has changed so we may be loading video elements
|
// Call state has changed so we may be loading video elements
|
||||||
// which will obscure the message log.
|
// which will obscure the message log.
|
||||||
// scroll to bottom
|
// scroll to bottom
|
||||||
var scrollNode = this._getScrollNode();
|
this.scrollToBottom();
|
||||||
if (scrollNode) {
|
|
||||||
scrollNode.scrollTop = scrollNode.scrollHeight;
|
|
||||||
}
|
|
||||||
callState = call.call_state;
|
callState = call.call_state;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -287,12 +284,8 @@ module.exports = React.createClass({
|
|||||||
messagePanel.addEventListener('dragleave', this.onDragLeaveOrEnd);
|
messagePanel.addEventListener('dragleave', this.onDragLeaveOrEnd);
|
||||||
messagePanel.addEventListener('dragend', this.onDragLeaveOrEnd);
|
messagePanel.addEventListener('dragend', this.onDragLeaveOrEnd);
|
||||||
|
|
||||||
var messageWrapperScroll = this._getScrollNode();
|
this.scrollToBottom();
|
||||||
|
|
||||||
messageWrapperScroll.scrollTop = messageWrapperScroll.scrollHeight;
|
|
||||||
|
|
||||||
this.sendReadReceipt();
|
this.sendReadReceipt();
|
||||||
|
|
||||||
this.fillSpace();
|
this.fillSpace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user