0

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.

Metabble
  • 11,773
  • 1
  • 16
  • 29
nspavlo
  • 377
  • 3
  • 12
  • As far as I know you can't control how the page moves when you focus on an input area in iOS. It's defined by the browser and not by the page or code. – Blieque Sep 03 '12 at 15:32
  • As Blieque said, you can not control that. The browser decides what to do - test any other framework and it happens with all of them. –  Sep 04 '12 at 20:01

1 Answers1

0

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

Carlos Ouro
  • 565
  • 6
  • 16