Preventing an <input> element from scrolling the screen on iPhone?

前端 未结 5 1018
后悔当初
后悔当初 2020-12-08 03:04

I have several elements on my webpage. I\'m using jQTouch, and I\'m trying to stay fullscreen at all times; that is, horizontal sc

5条回答
  •  爱一瞬间的悲伤
    2020-12-08 03:49

    I just found the solution to this problem in this post Stop page scrolling from focus

    Just add onFocus="window.scrollTo(0, 0);" to your input field and you're done! (Tried it with