mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 09:46:09 +03:00
restore scroll position after hiding typing notifs with checkScroll
This commit is contained in:
parent
85d305430f
commit
3e13a11372
2 changed files with 3 additions and 3 deletions
|
@ -647,6 +647,9 @@ module.exports = React.createClass({
|
||||||
// update the scrollPanel, we tell it to apply
|
// update the scrollPanel, we tell it to apply
|
||||||
// the shrinking prevention once the typing notifs are hidden
|
// the shrinking prevention once the typing notifs are hidden
|
||||||
scrollPanel.updatePreventShrinking();
|
scrollPanel.updatePreventShrinking();
|
||||||
|
// order is important here as checkScroll will scroll down to
|
||||||
|
// reveal added padding to balance the notifs disappearing.
|
||||||
|
scrollPanel.checkScroll();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -789,9 +789,6 @@ module.exports = React.createClass({
|
||||||
const offsetDiff = offsetFromBottom - currentOffset;
|
const offsetDiff = offsetFromBottom - currentOffset;
|
||||||
if (offsetDiff > 0) {
|
if (offsetDiff > 0) {
|
||||||
balanceElement.style.paddingBottom = `${offsetDiff}px`;
|
balanceElement.style.paddingBottom = `${offsetDiff}px`;
|
||||||
if (this.scrollState.stuckAtBottom) {
|
|
||||||
sn.scrollTop = sn.scrollHeight;
|
|
||||||
}
|
|
||||||
debuglog("update prevent shrinking ", offsetDiff, "px from bottom");
|
debuglog("update prevent shrinking ", offsetDiff, "px from bottom");
|
||||||
} else if (offsetDiff < 0) {
|
} else if (offsetDiff < 0) {
|
||||||
shouldClear = true;
|
shouldClear = true;
|
||||||
|
|
Loading…
Reference in a new issue