jquery - iPhone Header Position Changed when click in HTML5-input type number -


i working jquery mobile , phonegap. facing issue on iphone version. when click in input type number, header position changes.

note: in page when focus input type number number pad opened.

enter image description here

----

then when touch outside of textbox number pad closed , header position automatically changed back

enter image description here

----

here code

$("input,select").live("blur",function() {   settimeout(function(){     $("[data-role=header]").css("position","fixed");   },800);   $("[data-role=footer]").show(); }); $("input,select").live("focus",function() {   $("[data-role=header]").css("position","absolute");   $("[data-role=footer]").hide(); }); 

use code. it's worked me...

// workaround buggy header/footer fixed position when virtual keyboard on/off $('input, textarea') .on('focus', function (e) {     $('header, footer').css('position', 'absolute'); }) .on('blur', function (e) {     $('header, footer').css('position', 'fixed');     //force page redraw fix incorrectly positioned fixed elements     settimeout( function() {         window.scrollto( $.mobile.window.scrollleft(), $.mobile.window.scrolltop() );     }, 20 ); }); 

this bug fixed:https://github.com/jquery/jquery-mobile/issues/5532


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -