Skip to content

Commit 97a3877

Browse files
author
zhangxinxu
committed
Important updates for iOS Safari
Important updates for iOS Safari
1 parent 7246e52 commit 97a3877

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mobilebone",
3-
"version": "2.3.4",
3+
"version": "2.4.0",
44
"description": "Bone main for mobile web APP with a sigle page mode.",
55
"main": "src/mobilebone.js",
66
"directories": {

src/mobilebone.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
*
3939
* @type string
4040
**/
41-
Mobilebone.VERSION = '2.3.4';
41+
Mobilebone.VERSION = '2.4.0';
4242

4343
/**
4444
* Whether catch attribute of href from element with tag 'a'
@@ -868,7 +868,7 @@
868868
// In ios7+, swipe the edge of page will navigate Safari
869869
// that will trigger 'popstate' events and the page will transition twice
870870
var isSafari7 = !!navigator.userAgent.match(/safari/i) && !navigator.userAgent.match(/chrome/i) && typeof document.hidden !== "undefined" && !window.chrome;
871-
if ('ontouchstart' in window == true) {
871+
if ('ontouchstart' in window == true && isSafari7) {
872872
document.addEventListener("touchmove", function() {
873873
history.popstateswipe = true;
874874
});

0 commit comments

Comments
 (0)