cozy-ui 105.0.1 → 105.0.2

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [105.0.2](https://github.com/cozy/cozy-ui/compare/v105.0.1...v105.0.2) (2024-03-20)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **Viewer:** Events must be limited on the image ([548994d](https://github.com/cozy/cozy-ui/commit/548994d))
7
+
1
8
  ## [105.0.1](https://github.com/cozy/cozy-ui/compare/v105.0.0...v105.0.1) (2024-03-19)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-ui",
3
- "version": "105.0.1",
3
+ "version": "105.0.2",
4
4
  "description": "Cozy apps UI SDK",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -51,7 +51,10 @@ export const PdfMobileViewer = ({ file, url, t, gestures }) => {
51
51
  if (gestures) {
52
52
  gestures.get('pinch').set({ enable: true })
53
53
  gestures.on('pinchend tap', evt => {
54
- if (evt.type === 'pinchend' || evt.tapCount === 1) {
54
+ if (
55
+ (evt.type === 'pinchend' || evt.tapCount === 1) &&
56
+ evt.target === imgRef.current
57
+ ) {
55
58
  handleOnClick(file)
56
59
  }
57
60
  })
@@ -101,7 +101,7 @@ export var PdfMobileViewer = function PdfMobileViewer(_ref) {
101
101
  enable: true
102
102
  });
103
103
  gestures.on('pinchend tap', function (evt) {
104
- if (evt.type === 'pinchend' || evt.tapCount === 1) {
104
+ if ((evt.type === 'pinchend' || evt.tapCount === 1) && evt.target === imgRef.current) {
105
105
  handleOnClick(file);
106
106
  }
107
107
  });