4

I was making a Phonegap App in which there is a input field inside a iscoll4 container. The gray background is of iscroll and a text field is a "Enter ID". The Screen Shot is before

Screen Shot of initial Screen

When I click on the Text Box the keyboard Pops Up that is working fine but the text field is behind the keyboard and the user cant see the text field properly. The Screen Shot is before.

Screen Shot of after Keyboard popup

And as soon as I start typing the text box scrolls up.

After Typing the text field

My problem is that the text box should scroll up as soon as I click on text field and the keyboard is shown.

I am using Phonegap 2.2 and iscroll4. I am working on iPhone with iOS 5.1 and iOS 6.0.

I have already tried using following things

  1. iScroll.scrollToElement('#ID'); - It is scrolling up but immediately it get back to the previous position
  2. create a keyboard event using jQuery ( jQuery.event.trigger({ type : 'keypress', which : character.charCodeAt(32) });) - it dont work on iPhone.
BlueSun
  • 3,541
  • 1
  • 18
  • 37
Varun Agarwal
  • 299
  • 3
  • 12
  • i allso encountered this problem, check out this thread: http://stackoverflow.com/questions/2307200/iphone-keyboard-hides-textfield – Adir.el Mar 23 '14 at 15:43
  • This question is specific to a Cordova implementation -- not sure your link helps. – Daniel Brown Sep 02 '16 at 18:20

0 Answers0