Auto hiding header bar on keyboard input

Hi, I’ve consulted so many posts about keyboard hiding header bar and found the solution to be:

  1. add a keyboard plugin cordova plugin add using command line.
  2. add cordova.plugins.Keyboard.disableScroll(true); to the javascript.

Following post also says so:

But when i do above steps, i get an error cordova is not defined. I added the disableScroll function to my controller.

I’m sure it’s something silly that i’m doing, but can please anybody lend some help. Thanks.

I resolved it finally. There was something junk in the project. I uninstalled the keyboard plugin. reinstalled it. then removed ios platform from the project, and then reinstalled it. that way platform took the keyboard plugin from the beginning and finally it worked.