Pergunta

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.

Foi útil?

Solução

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! :)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top