Skip to content


Subversion checkout URL

You can clone with
Download ZIP


"autofocus" on input types breaks jQuery Mobile page layout #5385

amit-purkait opened this Issue · 3 comments

4 participants


On writing my own HTML5 jQM application, I came across this unusual behavior. Whenever I use the "autofocus" attribute on any input elements, my jQuery mobile page breaks. I use long texts on my page with an input field and a button at the bottom. Doing autofocus on the input field floods the whole page with my text. I cannot see my header and the footer and the input field are missplaced. I can confirm this with jQM 1.1.0 and 1.2.0 on a WebKit browser (Chrome & Android). Below is an example of how this actually looks:

PS: Firefox has no problem with this.


I cleaned up the markup. New test page:
You won't see the issue in the output panel, only in the live preview:


@amit-purkait, @jaspermdegroot Testing with the live preview page ( in FX 34 (Windows), Chrome 39 (Windows and Android), IE 11 (Windows) I can't reproduce the issue. The input element get focus (but the page isn't scrolled down). @arschmitz I suggest closing this issue as it has been fixed or/and the issue is stall.


@Ruffio agreed closing

@arschmitz arschmitz closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.