-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
246e035
commit 80607e1
Showing
8 changed files
with
20 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "photoswipe", | ||
"homepage": "http://photoswipe.com", | ||
"homepage": "https://photoswipe.com", | ||
"authors": [ | ||
"Dmitry Semenov <[email protected]> (http://dimsemenov.com)" | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/*! PhotoSwipe - v4.1.2 - 2017-04-05 | ||
/*! PhotoSwipe - v4.1.3 - 2019-01-08 | ||
* http://photoswipe.com | ||
* Copyright (c) 2017 Dmitry Semenov; */ | ||
* Copyright (c) 2019 Dmitry Semenov; */ | ||
(function (root, factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define(factory); | ||
|
@@ -157,7 +157,7 @@ var framework = { | |
features.caf = window.cancelAnimationFrame; | ||
} | ||
|
||
features.pointerEvent = navigator.pointerEnabled || navigator.msPointerEnabled; | ||
features.pointerEvent = !!(window.PointerEvent) || navigator.msPointerEnabled; | ||
|
||
// fix false-positive detection of old Android in new IE | ||
// (IE11 ua string contains "Android 4.0") | ||
|
@@ -1987,9 +1987,7 @@ var _gestureStartTime, | |
if(pointerIndex > -1) { | ||
releasePoint = _currPointers.splice(pointerIndex, 1)[0]; | ||
|
||
if(navigator.pointerEnabled) { | ||
releasePoint.type = e.pointerType || 'mouse'; | ||
} else { | ||
if(navigator.msPointerEnabled) { | ||
This comment has been minimized.
Sorry, something went wrong. |
||
var MSPOINTER_TYPES = { | ||
4: 'mouse', // event.MSPOINTER_TYPE_MOUSE | ||
2: 'touch', // event.MSPOINTER_TYPE_TOUCH | ||
|
@@ -2000,6 +1998,8 @@ var _gestureStartTime, | |
if(!releasePoint.type) { | ||
releasePoint.type = e.pointerType || 'mouse'; | ||
} | ||
} else { | ||
releasePoint.type = e.pointerType || 'mouse'; | ||
} | ||
|
||
} | ||
|
@@ -2452,11 +2452,11 @@ _registerModule('Gestures', { | |
} | ||
|
||
if(_pointerEventEnabled) { | ||
if(navigator.pointerEnabled) { | ||
addEventNames('pointer', 'down', 'move', 'up', 'cancel'); | ||
} else { | ||
if(navigator.msPointerEnabled) { | ||
This comment has been minimized.
Sorry, something went wrong.
KingSora
|
||
// IE10 pointer events are case-sensitive | ||
addEventNames('MSPointer', 'Down', 'Move', 'Up', 'Cancel'); | ||
} else { | ||
addEventNames('pointer', 'down', 'move', 'up', 'cancel'); | ||
} | ||
} else if(_features.touch) { | ||
addEventNames('touch', 'start', 'move', 'end', 'cancel'); | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 comment
on commit 80607e1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome to see some dev activity again!
I don't want to open a PR for this, because you'll likely not merge it, but with this change
IE11
wont execute swipe, zoom or other touch like gestures. You can test it, open your Demo page with IE11 and see for yourself.Thats because
IE11
also has the propertynavigator.msPointerEnabled
likeIE10
, butIE11
events are different fromIE10
events, but with thisif
statement youre basically applyingIE10
events toIE11
. The correctif
statement should be something like this:because IE10 doesn't have the property
navigator.pointerEnabled
, butIE11
has it.