cozy-ui 110.0.0 → 110.0.1

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
+ ## [110.0.1](https://github.com/cozy/cozy-ui/compare/v110.0.0...v110.0.1) (2024-06-19)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Print in Safari ([03bab6b](https://github.com/cozy/cozy-ui/commit/03bab6b))
7
+
1
8
  # [110.0.0](https://github.com/cozy/cozy-ui/compare/v109.2.0...v110.0.0) (2024-06-18)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-ui",
3
- "version": "110.0.0",
3
+ "version": "110.0.1",
4
4
  "description": "Cozy apps UI SDK",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -48,7 +48,13 @@ export const print = () => {
48
48
  docUrl = URL.createObjectURL(blob)
49
49
  }
50
50
 
51
- window.open(docUrl, '_blank')
51
+ /*
52
+ We need to write window.open in a setTimeout because
53
+ Safari does not allow window.open in an async function.
54
+ */
55
+ setTimeout(() => {
56
+ window.open(docUrl, '_blank')
57
+ })
52
58
  } catch (error) {
53
59
  logger.error(
54
60
  `Error trying to print document ${
@@ -102,7 +102,13 @@ export var print = function print() {
102
102
  docUrl = URL.createObjectURL(_blob);
103
103
 
104
104
  case 30:
105
- window.open(docUrl, '_blank');
105
+ /*
106
+ We need to write window.open in a setTimeout because
107
+ Safari does not allow window.open in an async function.
108
+ */
109
+ setTimeout(function () {
110
+ window.open(docUrl, '_blank');
111
+ });
106
112
  _context.next = 36;
107
113
  break;
108
114