[Solved] Can't get Cordova to hide keyboard acc bar... any ideas?


#1

I’m trying to get Cordova to hide the keyboard acc bar and it doesn’t seem to work when using the config. Anything i’m doing wrong?

I’m assuming it’s yet another Cordova thing that doesn’t work as it’s documented :frowning:

App.setPreference('HideKeyboardFormAccessoryBar', true);

#2

For future searches, I just needed to install the keyboard plugin for the config to work.
https://www.npmjs.com/package/cordova-plugin-keyboard


#3

Hi! Where do you place setup settings for this plugin? For example Keyboard.disableScrollingInShrinkView(true);. Should I place it in mobile-config.js or in Meteor.startup?


#4

I think you can place it in your Meteor.startup to initialize it and then you can call it anywhere else on demand if you need to adjust it (sometimes it can be nice to call disableScrollingInShrinkView on and off depending on the UI.


#5

Thanks for the answer!

After installing this keyboard plugin and setting it up in mobile-config.js:

App.setPreference('HideKeyboardFromAccessoryBar', true);

I started to receive these logs:

exception nativeEvalAndFetch : ReferenceError: Can't find variable: cordova  (localhost:1:174)
exception nativeEvalAndFetch : ReferenceError: Can't find variable: cordova  (localhost:1:115)
exception nativeEvalAndFetch : ReferenceError: Can't find variable: Keyboard (localhost:1:113)

I am on Meteor 1.3.2.4 & using new import syntax (imports folder).

Should I import cordova plugin somewhere? Or what can cause these logs?


#6

Hmm not sure. Most of my Cordova experience is pre “meteor cordova” and i’m using React Native for all new work.

Best of luck! :thumbsup: