diff --git a/src/addon/messages/pages/discussion/discussion.ts b/src/addon/messages/pages/discussion/discussion.ts index ebea96e97..ceaf7af71 100644 --- a/src/addon/messages/pages/discussion/discussion.ts +++ b/src/addon/messages/pages/discussion/discussion.ts @@ -52,6 +52,7 @@ export class AddonMessagesDiscussionPage implements OnDestroy { protected keepMessageMap = {}; protected syncObserver: any; protected oldContentHeight = 0; + protected keyboardObserver: any; userId: number; currentUserId: number; @@ -178,6 +179,11 @@ export class AddonMessagesDiscussionPage implements OnDestroy { this.loaded = true; }); }); + + // Recalculate footer position when keyboard is shown or hidden. + this.keyboardObserver = this.eventsProvider.on(CoreEventsProvider.KEYBOARD_CHANGE, (isOn) => { + this.content.resize(); + }); } /** @@ -692,6 +698,7 @@ export class AddonMessagesDiscussionPage implements OnDestroy { // Unset again, just in case. this.unsetPolling(); this.syncObserver && this.syncObserver.off(); + this.keyboardObserver && this.keyboardObserver.off(); this.viewDestroyed = true; } }