Skip to content

Commit 7ce480d

Browse files
authored
Merge pull request #918 from crazyserver/MOBILE-1988-1
MOBILE-1988 core: Trigger resize when iOS keyboard toggled
2 parents 94a0794 + a00ccfd commit 7ce480d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

www/core/main.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,11 @@ angular.module('mm.core', ['pascalprecht.translate'])
201201
$window.addEventListener('native.keyboardshow', function(e) {
202202
$mmEvents.trigger(mmCoreEventKeyboardShow, e);
203203

204+
// Resize is not triggered on iOS.
205+
if (ionic.Platform.isIOS()) {
206+
ionic.trigger('resize');
207+
}
208+
204209
if (ionic.Platform.isIOS() && document.activeElement && document.activeElement.tagName != 'BODY') {
205210
if ($mmUtil.closest(document.activeElement, 'ion-footer-bar[keyboard-attach]')) {
206211
// Input element is in a footer with keyboard-attach directive, nothing to be done.
@@ -233,6 +238,11 @@ angular.module('mm.core', ['pascalprecht.translate'])
233238
});
234239
$window.addEventListener('native.keyboardhide', function(e) {
235240
$mmEvents.trigger(mmCoreEventKeyboardHide, e);
241+
242+
// Resize is not triggered on iOS.
243+
if (ionic.Platform.isIOS()) {
244+
ionic.trigger('resize');
245+
}
236246
});
237247
});
238248

0 commit comments

Comments
 (0)