jquery-archive / jquery-mobile

jQuery Mobile Framework
https://jquerymobile.com
Other
9.69k stars 2.41k forks source link

focus on a textinput is pushing up the body on iOS6 #5062

Closed MrGorki closed 11 years ago

MrGorki commented 11 years ago

It is a weird behavior but when you click on a text-input on rc2 (it was also available on rc1): the keyboard arises and pushes the view to out of border. When it get closed by dynamic way.. like js, it doesn't come back and leave a white gap on top. But when you click Done button on the keyboard; it closes normally and doesn't make any problem.

Edit: It appears on Phonegap by the way.

toddparker commented 11 years ago

Can you provide a test page using latest so we can reproduce?

MrGorki commented 11 years ago

OK. I will try to arrange a test page as soon as possible

MrGorki commented 11 years ago

Ok. You can find the test page on www.clozeer.com. When you will try to load this screen with Phonegap on iOS6 simulator. You will face the problem but not with the iOS5.1 or less simulators.

1) Load it and select a result from autocomplete: Not works 2) Load it and click done: Works

toddparker commented 11 years ago

Can you test to see if this happens without jQuery Mobile? This could be a slightly different behavior with iOS 6

MrGorki commented 11 years ago

I've just tried but it is not happening without jqm because natively it is not focusing or unfocusing the textbox by pushing or pulling the dom elements up/down. It is just zooming the text box and leaving as it is afterwards. Not zooming out again I mean. But zooming out is necessary as your current approach is working perfectly with 5.1. Why not 6? :(

toddparker commented 11 years ago

Are you testing on latest Git or at least rc2? We landed a fix for the form zoom behavior in iOS 6 for rc2.

MrGorki commented 11 years ago

I am using this CDN library: http://code.jquery.com/mobile/1.2.0-rc.2/jquery.mobile-1.2.0-rc.2.min.js

MrGorki commented 11 years ago

I did put the code in jsbin also: http://jsbin.com/ivizem/1 I hope you will fix it because only this issue left which blocks me to release my app.

toddparker commented 11 years ago

Looking at this again, this is just built-in iOS behavior to ensure the input is scrolled into view, centered above the on-screen keyboard. This is completely out of our control and is something Apple thinks is important for usability reasons.

Closing this as won't (can't) fix.