Issue 20 in mobile-bookmark-bubble: Will cause the homepage to swipe to page 2 when used with jquery

33 views
Skip to first unread message

mobile-book...@googlecode.com

unread,
Nov 3, 2011, 12:16:03 AM11/3/11
to mobile-book...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 20 by bigmas...@gmail.com: Will cause the homepage to swipe to
page 2 when used with jquery
http://code.google.com/p/mobile-bookmark-bubble/issues/detail?id=20

What steps will reproduce the problem?
1. Testing with JQuery Mobile jquery.mobile-1.0rc2.min.js
2. upon loading, page moves to left and an empty page is displayed with the
bubble
3.

What is the expected output? What do you see instead?
bubble should be displayed on the homepage and not cause firstpage to move
to left

What version of the product are you using? On what operating system?
Tested with all iphones and ipad versions

Please provide any additional information below.

mobile-book...@googlecode.com

unread,
Nov 3, 2011, 12:20:06 AM11/3/11
to mobile-book...@googlegroups.com

Comment #1 on issue 20 by bigmas...@gmail.com: Will cause the homepage to

after some investigation, this is caused by addition of bmb=1 to the URL in
window.location.hash += parameter;.

This adds #/bmb=1 to the URL which causes a page swipe.

mobile-book...@googlecode.com

unread,
Jul 28, 2012, 11:39:48 AM7/28/12
to mobile-book...@googlegroups.com

Comment #2 on issue 20 by AndrewKo...@gmail.com: Will cause the homepage to
As a workaround, I use the HTML5 history object to adjust the URL without a
page refresh, and without using the hash tag. This seems to work for me.
See below for code:

var parameter = 'bmb=1';

bubble.hasHashParameter = function () {
return window.location.search.indexOf(parameter) != -1;
};

bubble.setHashParameter = function () {
if (!this.hasHashParameter()) {
if (window.location.search.indexOf('?') == -1) {
window.history.replaceState('Object', 'Title', window.location + '?'
+ parameter);
} else {
window.history.replaceState('Object', 'Title', window.location + '&'
+ parameter);
}
}
};


Reply all
Reply to author
Forward
0 new messages