@refinitiv-ui/elements 6.16.2 → 6.16.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.
- package/CHANGELOG.md +6 -0
- package/lib/overlay/managers/interaction-lock-manager.js +8 -4
- package/lib/overlay/managers/viewport-manager.js +1 -1
- package/lib/tooltip/elements/tooltip-element.js +1 -1
- package/lib/tooltip/managers/tooltip-manager.js +2 -2
- package/lib/version.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [6.16.3](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@6.16.2...@refinitiv-ui/elements@6.16.3) (2024-04-01)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **tooltip:** handle body removal ([#1131](https://github.com/Refinitiv/refinitiv-ui/issues/1131)) ([347f98e](https://github.com/Refinitiv/refinitiv-ui/commit/347f98e3cb1284c812390083f543aea36bb14173))
|
|
11
|
+
|
|
6
12
|
## [6.16.2](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@6.16.1...@refinitiv-ui/elements@6.16.2) (2024-03-18)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
|
@@ -196,8 +196,8 @@ export class ScrollLockManager {
|
|
|
196
196
|
}
|
|
197
197
|
else {
|
|
198
198
|
// Since we don't know if is the body or html, get max.
|
|
199
|
-
this.scrollTop = Math.max(document.documentElement.scrollTop, document.body
|
|
200
|
-
this.scrollLeft = Math.max(document.documentElement.scrollLeft, document.body
|
|
199
|
+
this.scrollTop = Math.max(document.documentElement.scrollTop, document.body?.scrollTop ?? 0);
|
|
200
|
+
this.scrollLeft = Math.max(document.documentElement.scrollLeft, document.body?.scrollLeft ?? 0);
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
/**
|
|
@@ -211,8 +211,12 @@ export class ScrollLockManager {
|
|
|
211
211
|
}
|
|
212
212
|
else {
|
|
213
213
|
// Since we don't know if is the body or html, set both.
|
|
214
|
-
document.documentElement.scrollTop =
|
|
215
|
-
document.documentElement.scrollLeft =
|
|
214
|
+
document.documentElement.scrollTop = this.scrollTop;
|
|
215
|
+
document.documentElement.scrollLeft = this.scrollTop;
|
|
216
|
+
if (document.body) {
|
|
217
|
+
document.body.scrollTop = this.scrollTop;
|
|
218
|
+
document.body.scrollLeft = this.scrollLeft;
|
|
219
|
+
}
|
|
216
220
|
}
|
|
217
221
|
}
|
|
218
222
|
/**
|
|
@@ -94,7 +94,7 @@ export class ViewportManager {
|
|
|
94
94
|
// @ts-ignore
|
|
95
95
|
// TODO: Remove @ts-ignore and re-test again when standardized zoom is implemented across major browsers and TypeScript, https://github.com/w3c/csswg-drafts/issues/5623
|
|
96
96
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
97
|
-
const zoom = parseFloat(window.getComputedStyle(document.body).zoom);
|
|
97
|
+
const zoom = document.body ? parseFloat(window.getComputedStyle(document.body).zoom) : 1;
|
|
98
98
|
const screenHeight = screenRect.height / zoom;
|
|
99
99
|
const screenWidth = screenRect.width / zoom;
|
|
100
100
|
const { top, left, bottom, right } = viewport.getBoundingClientRect();
|
|
@@ -42,7 +42,7 @@ tooltipElement.setAttribute('ref', 'title-override');
|
|
|
42
42
|
tooltipElement.condition = condition;
|
|
43
43
|
tooltipElement.renderer = renderer;
|
|
44
44
|
const appendTitleTooltip = () => {
|
|
45
|
-
document.body
|
|
45
|
+
document.body?.appendChild(tooltipElement);
|
|
46
46
|
};
|
|
47
47
|
if (document.body) {
|
|
48
48
|
appendTitleTooltip();
|
|
@@ -99,7 +99,7 @@ class TooltipManager {
|
|
|
99
99
|
document.addEventListener('mouseleave', this.onMouseLeave, eventOptions);
|
|
100
100
|
document.addEventListener('wheel', this.onWheel, eventOptions);
|
|
101
101
|
document.addEventListener('keydown', this.onKeyDown, eventOptions);
|
|
102
|
-
document.body
|
|
102
|
+
document.body?.addEventListener('blur', this.onBlur, eventOptions);
|
|
103
103
|
const clickEventOptions = supportOptions ? { passive: true, capture: true } : true;
|
|
104
104
|
document.addEventListener('click', this.onClick, clickEventOptions);
|
|
105
105
|
document.addEventListener('contextmenu', this.onClick, clickEventOptions);
|
|
@@ -114,7 +114,7 @@ class TooltipManager {
|
|
|
114
114
|
document.removeEventListener('mouseleave', this.onMouseLeave);
|
|
115
115
|
document.removeEventListener('wheel', this.onWheel);
|
|
116
116
|
document.removeEventListener('keydown', this.onKeyDown);
|
|
117
|
-
document.body
|
|
117
|
+
document.body?.removeEventListener('blur', this.onBlur);
|
|
118
118
|
document.removeEventListener('click', this.onClick, true);
|
|
119
119
|
document.removeEventListener('contextmenu', this.onClick, true);
|
|
120
120
|
}
|
package/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '6.16.
|
|
1
|
+
export const VERSION = '6.16.3';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@refinitiv-ui/elements",
|
|
3
|
-
"version": "6.16.
|
|
3
|
+
"version": "6.16.3",
|
|
4
4
|
"description": "Element Framework Elements",
|
|
5
5
|
"author": "LSEG",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
},
|
|
352
352
|
"devDependencies": {
|
|
353
353
|
"@refinitiv-ui/core": "^6.5.6",
|
|
354
|
-
"@refinitiv-ui/demo-block": "^6.1.
|
|
354
|
+
"@refinitiv-ui/demo-block": "^6.1.23",
|
|
355
355
|
"@refinitiv-ui/i18n": "^6.0.21",
|
|
356
356
|
"@refinitiv-ui/phrasebook": "^6.3.9",
|
|
357
357
|
"@refinitiv-ui/test-helpers": "^6.0.15",
|
|
@@ -370,5 +370,5 @@
|
|
|
370
370
|
"publishConfig": {
|
|
371
371
|
"access": "public"
|
|
372
372
|
},
|
|
373
|
-
"gitHead": "
|
|
373
|
+
"gitHead": "946b383a1e4f8253620c23c41c2e502f22cb2c6b"
|
|
374
374
|
}
|