yet-another-react-lightbox 3.23.2 → 3.23.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -93,6 +93,11 @@ function VideoSlide({ slide, offset }) {
93
93
  }
94
94
  return null;
95
95
  };
96
+ const stopPropagationInSafari = (event) => {
97
+ if (/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)) {
98
+ event.stopPropagation();
99
+ }
100
+ };
96
101
  return (React.createElement(React.Fragment, null, sources && (React.createElement("div", { ref: setContainerRef, style: {
97
102
  width: "100%",
98
103
  height: "100%",
@@ -106,7 +111,7 @@ function VideoSlide({ slide, offset }) {
106
111
  publish(ACTIVE_SLIDE_PLAYING);
107
112
  }, onEnded: () => {
108
113
  publish(ACTIVE_SLIDE_COMPLETE);
109
- } }, sources.map(({ src, type, media }) => (React.createElement("source", { key: [src, type, media].filter(Boolean).join("|"), src: src, type: type, media: media })))))))));
114
+ }, onPointerUp: stopPropagationInSafari, onPointerDown: stopPropagationInSafari, onPointerMove: stopPropagationInSafari }, sources.map(({ src, type, media }) => (React.createElement("source", { key: [src, type, media].filter(Boolean).join("|"), src: src, type: type, media: media })))))))));
110
115
  }
111
116
 
112
117
  function isVideoSlide(slide) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yet-another-react-lightbox",
3
- "version": "3.23.2",
3
+ "version": "3.23.3",
4
4
  "description": "Modern React lightbox component",
5
5
  "author": "Igor Danchenko",
6
6
  "license": "MIT",