From a00ccfdb7153ad053b0e2b1495ad802f35672356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 21 Feb 2017 09:23:04 +0100 Subject: [PATCH] MOBILE-1988 core: Trigger resize when iOS keyboard toggled --- www/core/main.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/www/core/main.js b/www/core/main.js index c4f4f39217d..ad786c324bb 100644 --- a/www/core/main.js +++ b/www/core/main.js @@ -201,6 +201,11 @@ angular.module('mm.core', ['pascalprecht.translate']) $window.addEventListener('native.keyboardshow', function(e) { $mmEvents.trigger(mmCoreEventKeyboardShow, e); + // Resize is not triggered on iOS. + if (ionic.Platform.isIOS()) { + ionic.trigger('resize'); + } + if (ionic.Platform.isIOS() && document.activeElement && document.activeElement.tagName != 'BODY') { if ($mmUtil.closest(document.activeElement, 'ion-footer-bar[keyboard-attach]')) { // Input element is in a footer with keyboard-attach directive, nothing to be done. @@ -233,6 +238,11 @@ angular.module('mm.core', ['pascalprecht.translate']) }); $window.addEventListener('native.keyboardhide', function(e) { $mmEvents.trigger(mmCoreEventKeyboardHide, e); + + // Resize is not triggered on iOS. + if (ionic.Platform.isIOS()) { + ionic.trigger('resize'); + } }); });