0

I am setting up a split view HTML application for the iPad. I am using jQuery Mobile. I found a nice CSS way of doing the splitview (using -webkit-overflow-scrolling: touch; overflow:auto;
) and this works fine for form fields, however as soon as I include the jQuery Mobile scripts when I click on any input field the div scrolls to the top (although input does seem to be focused on the form field that was tapped on.)

I would appreciate any suggestions on how to suppress that scroll to top behaviour.

I have searched and found heaps of people complaining about the scroll to top for page transitions, but I believe this is different.

You can see this behavior on this jsfiddle, scroll down the right hand side and click any input field, the screen scrolls to the top (edit the fiddle here) Removing the jqm scripts removes this behavior.

We did try the excellent asyraf9 splitview but performance degrades markedly as we add more form items, and I am reluctant to pick up a custom fork of jqm, and have been trying a straight css apoproach.

MarkGr
  • 1,048
  • 11
  • 13

1 Answers1

0

This was an issue for us too where entering in input fields of pages caused the screen to jump up an down madly. A cause for this is the 3D webkit is broken in Android.

Android Browser textarea scrolls all over the place, is unusable

So using any such thing for inputs could cause this behavior. But we weren't using have any such thing. From http://www.sencha.com/forum/archive/index.php/t-132885.html?s=8cb1ed44a5383de62fffee964654a338 and http://java-cerise.blogspot.in/2012/02/android-browser-jumping-up-and-down.html

there seems to be a strange issue that a fixed div has to have a higher z-index than ANY absolute div in the page. i couldn't find the reason for it but putting this in action for our fixed divs fixed this issue.

try this and see if its the same issue.

On the note of custom fork of JQM, the changes are only few and i upgraded splitview jqm to the last stable version of jqm, which was 1.0.1 easily.

Community
  • 1
  • 1
ghostCoder
  • 1
  • 9
  • 49
  • 72