javascript - iOS scrolls to the top on input after first character -
here's scenario:
- open website in safari on iphone
- click/tap on input text field
- the window scrolls vertically center field in viewport (fine)
- type first character using keyboard
- 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
Post a Comment