Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

The text "This theme provides a Windows Phone user interface..." on the main demo page is clipped #29

Closed
sgrebnov opened this Issue Mar 1, 2013 · 2 comments

Comments

Projects
None yet
1 participant
Owner

sgrebnov commented Mar 1, 2013

No description provided.

Owner

sgrebnov commented Mar 26, 2013

Seems like it is a general jQM issue - padding-top of ui-page element is calculated incorrectly so ui-content element is displayed at the top of the ui-page instead of below the header element. So header overlaps the top part of the content.
The problem is in the following code:
updatePagePadding: function( tbPage ) {

pos = parseFloat( $el.css( header ? "top" : "bottom" ) ); // <-- this line has been added only in jQM 1.3
// parseFloat returns NaN because the value of header top property is 'auto'. Next calculations that are used 'pos' are //incorrect.

@sgrebnov sgrebnov added a commit that referenced this issue Apr 5, 2013

@sgrebnov sgrebnov fixes #29 The text "This theme provides a Windows Phone user interfac…
…e..." on the main demo page is clipped
1444bbf
Owner

sgrebnov commented Apr 5, 2013

It seems that '$el.css( header ? "top" : "bottom" )' returns 'auto' only if updatePagePadding is called before the page has been loaded. If it is called in document.ready handler it returns correct value '0px'.
Implemented quick fix that calls updatePagePadding one more time after the page has been loaded, but probably the better solution is to add isNaN check in updatePagePadding after parsing the value of CSS property.

@sgrebnov sgrebnov closed this Apr 5, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment