@atlaskit/react-ufo 2.8.2 → 2.9.0
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,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/ufo-interaction-ignore
|
|
2
2
|
|
|
3
|
+
## 2.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#101686](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/101686)
|
|
8
|
+
[`e26a94f833e02`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e26a94f833e02) -
|
|
9
|
+
Add fallback error handling for check element visibility VC calculation logic
|
|
10
|
+
|
|
3
11
|
## 2.8.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -19,6 +19,17 @@ var state = {
|
|
|
19
19
|
waitingForFirstRender: 2,
|
|
20
20
|
ignoring: 3
|
|
21
21
|
};
|
|
22
|
+
function isElementVisible(target) {
|
|
23
|
+
if (!target || typeof target.checkVisibility !== 'function') {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
var isVisible = target.checkVisibility({
|
|
27
|
+
contentVisibilityAuto: true,
|
|
28
|
+
opacityProperty: true,
|
|
29
|
+
visibilityProperty: true
|
|
30
|
+
});
|
|
31
|
+
return isVisible;
|
|
32
|
+
}
|
|
22
33
|
function isInsideEditorContainer(target) {
|
|
23
34
|
if (!target || typeof target.closest !== 'function') {
|
|
24
35
|
return false;
|
|
@@ -255,12 +266,7 @@ var Observers = exports.Observers = /*#__PURE__*/function () {
|
|
|
255
266
|
return;
|
|
256
267
|
}
|
|
257
268
|
if ((0, _platformFeatureFlags.fg)('platform-ufo-invisible-element-vc-calculations')) {
|
|
258
|
-
|
|
259
|
-
contentVisibilityAuto: true,
|
|
260
|
-
opacityProperty: true,
|
|
261
|
-
visibilityProperty: true
|
|
262
|
-
});
|
|
263
|
-
if (!isVisible) {
|
|
269
|
+
if (!isElementVisible(target)) {
|
|
264
270
|
data.ignoreReason = 'not-visible';
|
|
265
271
|
}
|
|
266
272
|
}
|
|
@@ -8,6 +8,17 @@ const state = {
|
|
|
8
8
|
waitingForFirstRender: 2,
|
|
9
9
|
ignoring: 3
|
|
10
10
|
};
|
|
11
|
+
function isElementVisible(target) {
|
|
12
|
+
if (!target || typeof target.checkVisibility !== 'function') {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
const isVisible = target.checkVisibility({
|
|
16
|
+
contentVisibilityAuto: true,
|
|
17
|
+
opacityProperty: true,
|
|
18
|
+
visibilityProperty: true
|
|
19
|
+
});
|
|
20
|
+
return isVisible;
|
|
21
|
+
}
|
|
11
22
|
function isInsideEditorContainer(target) {
|
|
12
23
|
if (!target || typeof target.closest !== 'function') {
|
|
13
24
|
return false;
|
|
@@ -223,12 +234,7 @@ export class Observers {
|
|
|
223
234
|
return;
|
|
224
235
|
}
|
|
225
236
|
if (fg('platform-ufo-invisible-element-vc-calculations')) {
|
|
226
|
-
|
|
227
|
-
contentVisibilityAuto: true,
|
|
228
|
-
opacityProperty: true,
|
|
229
|
-
visibilityProperty: true
|
|
230
|
-
});
|
|
231
|
-
if (!isVisible) {
|
|
237
|
+
if (!isElementVisible(target)) {
|
|
232
238
|
data.ignoreReason = 'not-visible';
|
|
233
239
|
}
|
|
234
240
|
}
|
|
@@ -12,6 +12,17 @@ var state = {
|
|
|
12
12
|
waitingForFirstRender: 2,
|
|
13
13
|
ignoring: 3
|
|
14
14
|
};
|
|
15
|
+
function isElementVisible(target) {
|
|
16
|
+
if (!target || typeof target.checkVisibility !== 'function') {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
var isVisible = target.checkVisibility({
|
|
20
|
+
contentVisibilityAuto: true,
|
|
21
|
+
opacityProperty: true,
|
|
22
|
+
visibilityProperty: true
|
|
23
|
+
});
|
|
24
|
+
return isVisible;
|
|
25
|
+
}
|
|
15
26
|
function isInsideEditorContainer(target) {
|
|
16
27
|
if (!target || typeof target.closest !== 'function') {
|
|
17
28
|
return false;
|
|
@@ -248,12 +259,7 @@ export var Observers = /*#__PURE__*/function () {
|
|
|
248
259
|
return;
|
|
249
260
|
}
|
|
250
261
|
if (fg('platform-ufo-invisible-element-vc-calculations')) {
|
|
251
|
-
|
|
252
|
-
contentVisibilityAuto: true,
|
|
253
|
-
opacityProperty: true,
|
|
254
|
-
visibilityProperty: true
|
|
255
|
-
});
|
|
256
|
-
if (!isVisible) {
|
|
262
|
+
if (!isElementVisible(target)) {
|
|
257
263
|
data.ignoreReason = 'not-visible';
|
|
258
264
|
}
|
|
259
265
|
}
|