MobileChromeApps / mobile-chrome-apps

Chrome apps on Android and iOS
BSD 3-Clause "New" or "Revised" License
2.5k stars 347 forks source link

keyboard events does not fire anymore since cca 0.6 #535

Closed vhk closed 9 years ago

vhk commented 9 years ago

I update cca from 0.5.1 to 0.6 and did a new build of my code. Everything went fine, exept the detection of the keyboard show/hide event. Do i miss a plugin here ?

my code : document.addEventListener("showkeyboard", function() { // $(".linklogin").hide(); console.log('show keyboard'); }, false);

document.addEventListener("hidekeyboard", function() { // $(".linklogin").show(); console.log('hide keyboard'); }, false);

my plugin list : cca v0.6.0 com.google.cordova.admob 2.7.4 "AdMob Plugin Pro" com.google.playservices 19.0.0 "Google Play Services for Android" com.rjfun.cordova.extension 1.0.6 "Cordova Plugin Extension" cordova-plugin-whitelist 1.0.0-dev "Whitelist" org.apache.cordova.console 0.2.13 "Console" org.apache.cordova.device 0.3.0 "Device" org.apache.cordova.file 1.3.3 "File" org.apache.cordova.inappbrowser 0.6.0 "InAppBrowser" org.apache.cordova.network-information 0.2.15 "Network Information" org.apache.cordova.statusbar 0.1.10 "StatusBar" org.chromium.bootstrap 2.0.2 "Chrome Apps Core" org.chromium.cca-hooks 0.0.0 "undefined" org.chromium.common 1.0.6 "Chrome Apps Common Utils" org.chromium.i18n 2.0.0 "Chrome Apps I18n API" org.chromium.navigation 1.0.2 "Chrome Apps Navigation" org.chromium.polyfill.blob_constructor 1.0.1 "Blob constructor shim" org.chromium.polyfill.customevent 1.0.3 "CustomEvent constuctor shim" org.chromium.polyfill.xhr_features 1.0.2 "XHR Blob Response Type Polyfill" org.chromium.runtime 1.1.0 "Chrome App Runtime" org.chromium.storage 1.0.3 "Chrome Apps Storage API" org.crosswalk.engine 0.0.1-dev "Crosswalk Engine"

in the AndroidManifest.xml i set : android:windowSoftInputMode="adjustResize"

is this a bug? are do i miss here something? thanks

agrieve commented 9 years ago

Looks like that came from our updating of cordova-android to a newer version. The keyboard events were removed from the core android library since they were not cross-platform, and can be added using a plugin. I'd suggest adding https://github.com/driftyco/ionic-plugins-keyboard to get hide/show events

vhk commented 9 years ago

oké, thank you. i'll try to add the plugin instead.