javascript - iOS scrolls to the top on input after first character -


here's scenario:

  1. open website in safari on iphone
  2. click/tap on input text field
  3. the window scrolls vertically center field in viewport (fine)
  4. type first character using keyboard
  5. ios scrolls top of page whereas i'd stay @ step #3

i'm using jquery, , tried lot of different solution without success.

all i've learnt if preventdefault() event on keydown or keypress it's not scrolling top, there's no text in input (obviously). when try like: this.value = this.value + string.fromcharcode(e.keycode); scrolls again.

i tried cancel scroll event without success well.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -