I am using iScroll for providing iPhone style scrolling. But, when clicking on the textboxes, the keyboard does not show up.
While trying to find the possible cause, I found that removing the iScroll
script, makes it work normal, but in that case I miss the scrolling functionality.
Is this a bug in iScroll. If yes, is there a tested work-around? Or is there any alternative for iScroll?
Thanks in advance.
I added the following code to _start in iScroll 4.2 to solve this problem:
Code is inserted below the initialization part of the function (that.moved = false; ... that.dirY = 0;).
Tested it on iPad 1 (iOS 5.1) and iPad 3 (iOS 6). The onscreen keyboard does not seem to interfere with iScroll (I do an iScroll.refresh() every 5 seconds).
At least in iScroll 4, you can add this code to enable clicking of input fields. See the demo on Form-fields in the examples folder.
I was able to solve the error. The problem was with the CSS.
I thought may be the CSS is somehow creating the problem. I concluded this on the basis that when I commented the CSS for
wrapper
andscroller
, the keyboard showed up... but keeping them, the keyboard didn't work. I was usingbottom: 0px;
, which seemed to be somehow preventing the keyboard from showing.Removing
bottom: 0px;
solved my problem.Hope this helps others.
I believe this solution is optimal Tweak the code in iscroll.js, ( as follows )