From 0b0de7f41206be401801a4d7a2ff2b3eae971d65 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Wed, 5 Aug 2015 20:11:49 -0300 Subject: [PATCH] iOS: Fix client resize when keyboard shows --- .meteor/cordova-plugins | 2 +- client/lib/cordova/keyboard-fix.coffee | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 client/lib/cordova/keyboard-fix.coffee diff --git a/.meteor/cordova-plugins b/.meteor/cordova-plugins index 8b137891791..029983507c2 100644 --- a/.meteor/cordova-plugins +++ b/.meteor/cordova-plugins @@ -1 +1 @@ - +com.ionic.keyboard@https://github.com/driftyco/ionic-plugin-keyboard/tarball/66926f5e25fcd71b65799adaf12fa0b2df65ce78 \ No newline at end of file diff --git a/client/lib/cordova/keyboard-fix.coffee b/client/lib/cordova/keyboard-fix.coffee new file mode 100644 index 00000000000..ae6122be3b0 --- /dev/null +++ b/client/lib/cordova/keyboard-fix.coffee @@ -0,0 +1,10 @@ +if Meteor.isCordova + window.addEventListener 'deviceready', -> + cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); + cordova.plugins.Keyboard.disableScroll(true); + + window.addEventListener 'native.keyboardshow', -> + $('.main-content').css 'height', window.innerHeight + + window.addEventListener 'native.keyboardhide', -> + $('.main-content').css 'height', window.innerHeight \ No newline at end of file