Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Space between panels after refresh #16

Open
mnyc opened this issue Mar 24, 2013 · 1 comment
Open

Space between panels after refresh #16

mnyc opened this issue Mar 24, 2013 · 1 comment

Comments

@mnyc
Copy link

mnyc commented Mar 24, 2013

Not sure if anyone else experiences the same issue, but when I open http://asyraf9.github.com/jquerymobile-splitview/#badz on IPAD, and then refresh the page, I get space between left and right panels.

I traced it down to the following code in function splitView()

$main.addClass('ui-panel-right')
.width(function(){
return $(window).width()-$('div:jqmData(id="menu")').width();
});

On IPAD $(window).width() returns 768, so the math doesn't work.

I set width to 75% and it seem to work fine now (not sure if there's better solution)
$main.addClass('ui-panel-right').css('width','75%');

Also, if the page switches to landscape and menu is opened, menu panel is moved left 10px in function popover() .css($.mobile.menuBtnSide, '10px');

But when orientation changes to landscape, left position doesn't get reset. I fixed it by adding .css($.mobile.menuBtnSide, '0') in function splitView right before setting width

Hope this help someone...

BTW, thank you for the life saving widget. Out of all split view/multiview implementations, this is the most stable. And with the above 2 fixed, it's even better :-)

@asyraf9
Copy link
Owner

asyraf9 commented Mar 25, 2013

Thanks for this! Have not had the time to get it fixed!
On Mar 25, 2013 6:21 AM, "mnyc" [email protected] wrote:

Not sure if anyone else experiences the same issue, but when I open
http://asyraf9.github.com/jquerymobile-splitview/#badz on IPAD, and then
refresh the page, I get space between left and right panels.

I traced it down to the following code in function splitView()

$main.addClass('ui-panel-right')
.width(function(){
return $(window).width()-$('div:jqmData(id="menu")').width();
});

On IPAD $(window).width() returns 768, so the math doesn't work.

I set width to 75% and it seem to work fine now (not sure if there's
better solution)
$main.addClass('ui-panel-right').css('width','75%');

Also, if the page switches to landscape and menu is opened, menu panel is
moved left 10px in function popover() .css($.mobile.menuBtnSide, '10px');

But when orientation changes to landscape, left position doesn't get
reset. I fixed it by adding .css($.mobile.menuBtnSide, '0') in function
splitView right before setting width

Hope this help someone...

BTW, thank you for the life saving widget. Out of all split view/multiview
implementations, this is the most stable. And with the above 2 fixed, it's
even better :-)


Reply to this email directly or view it on GitHubhttps://github.com//issues/16
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants