Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm using jqmobi. http://jqmobi.com/testdrive - same here

On iOS when the input field becomes focused, the content moves up. I want the header to stay in the same position.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
208 views
Welcome To Ask or Share your Answers For Others

1 Answer

There no method to do it in the current jqMobi version. A Workaround is to reposition #jQUi style.top according to the document.body.scrollTop when the phone enters keyboard mode;

You can use $.touchLayer event 'enter-edit-reshape' and 'exit-edit-reshape' to detect the resize cross-browser.

$.bind($.touchLayer, 'enter-edit-reshape', function(){
    $('#jQUi').css('top', document.body.scrollTop+'px');
});
$.bind($.touchLayer, 'exit-edit-reshape', function(){
    $('#jQUi').css('top', 0);
});

Cheers! :)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...