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

amit-purkait opened this Issue Dec 17, 2012 · 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.

jQuery Foundation member

I cleaned up the markup. New test page: http://jsbin.com/osiwuw/13/edit
You won't see the issue in the output panel, only in the live preview: http://jsbin.com/osiwuw/13


@amit-purkait, @jaspermdegroot Testing with the live preview page (http://jsbin.com/osiwuw/13) 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.

jQuery Foundation member

@Ruffio agreed closing

@arschmitz arschmitz closed this Dec 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment