Merge pull request #1742 from dpalou/MOBILE-2841
MOBILE-2841 messages: Fix scroll bottom in iOS devices
This commit is contained in:
commit
6f6e4449a7
@ -352,8 +352,9 @@ export class AddonMessagesDiscussionPage implements OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if we are at the bottom to scroll it after render.
|
// Check if we are at the bottom to scroll it after render.
|
||||||
this.scrollBottom = this.domUtils.getScrollHeight(this.content) - this.domUtils.getScrollTop(this.content) ===
|
// Use a 5px error margin because in iOS there is 1px difference for some reason.
|
||||||
this.domUtils.getContentHeight(this.content);
|
this.scrollBottom = Math.abs(this.domUtils.getScrollHeight(this.content) - this.domUtils.getScrollTop(this.content) -
|
||||||
|
this.domUtils.getContentHeight(this.content)) < 5;
|
||||||
|
|
||||||
if (this.messagesBeingSent > 0) {
|
if (this.messagesBeingSent > 0) {
|
||||||
// Ignore polling due to a race condition.
|
// Ignore polling due to a race condition.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user