안드로이드 2.3 에서 하이브리드앱을 만들었습니다.

phonegap 1.7.0

jQuery moblie 1.7.1


content 높이를 계산해서 지정하는데

가끔(5회 실행중 1회 정도) 갤럭시S2에서 content 계산이 잘못되는지 content 영역이 절반정도 만 보입니다.


제 폰은 갤럭시S2 LTE HD인데 발생하지 않습니다.



최초 home화면 로딩할때 $(document).height()값이 원래의 높이값이 아닐까 추정은 하는데 


$("div[data-role='page']").live( "pageshow", function( event ) {

   head_height=$('[data-role=header]').outerHeight();

   footer_height=$('[data-role=footer]').outerHeight();

   doc_width=$(document).width();


   content_height= $(document).height() - head_height;

   content_height= content_height - footer_height;


   $('div[data-role=content]').css('height', content_height+'px');

   $('div[data-role=page]').css('min-height', $('div[data-role=page]').height()+'px');


} );


정상적인 경우

header 

 content - 이미지



 content - 메뉴

 


footer



오류 발생할 경우 <-- content 영역의 메뉴 윗부분만 보입니다. header와 footer는 제대로 보입니다.

header 

 content - 이미지



 content - 메뉴

footer



조언 부탁드립니다.