|
38 | 38 | *
|
39 | 39 | * @type string
|
40 | 40 | **/
|
41 |
| - Mobilebone.VERSION = '2.3.3'; |
| 41 | + Mobilebone.VERSION = '2.3.4'; |
42 | 42 |
|
43 | 43 | /**
|
44 | 44 | * Whether catch attribute of href from element with tag 'a'
|
|
269 | 269 | }
|
270 | 270 | // Fastclick may cause slide bug in iOS8, any innerHTML change can fix it!
|
271 | 271 | // issues #80
|
272 |
| - if (typeof FastClick != "undefined") { |
| 272 | + //if (typeof FastClick != "undefined") { |
273 | 273 | var mobilebone = document.querySelector("mobilebone");
|
274 | 274 | if (mobilebone == null) {
|
275 | 275 | mobilebone = document.createElement("mobilebone");
|
|
278 | 278 | document.body.appendChild(mobilebone);
|
279 | 279 | }
|
280 | 280 | mobilebone.innerHTML = mobilebone.innerHTML.replace('11', '') + '1';
|
281 |
| - } |
| 281 | + //} |
282 | 282 |
|
283 | 283 | // delete page with same id when options.remove !== false
|
284 | 284 | var pageid = options.id || pageInto.id;
|
|
339 | 339 | });
|
340 | 340 |
|
341 | 341 | // history
|
342 |
| - var url_push = pageid; |
| 342 | + var url_push = pageid, url_push_replaced = ''; |
343 | 343 | if (url_push && /^#/.test(url_push) == false) {
|
344 | 344 | url_push = "#" + url_push;
|
345 | 345 | }
|
346 |
| - |
347 |
| - if (supportHistory && this.pushStateEnabled && options.history !== false && url_push) { |
| 346 | + url_push_replaced = url_push.replace(/^#/, "#&"); |
| 347 | + |
| 348 | + if (supportHistory && this.pushStateEnabled && options.history !== false && url_push |
| 349 | + // hash should be different |
| 350 | + && url_push_replaced != location.hash |
| 351 | + ) { |
348 | 352 | // don't trigger 'popstate' events
|
349 | 353 | history.popstate = false;
|
350 | 354 | // if only pageIn, use 'replaceState'
|
|
0 commit comments