diff --git a/.storybook/style.scss b/.storybook/style.scss index e608bd9318..bc26e8928f 100644 --- a/.storybook/style.scss +++ b/.storybook/style.scss @@ -14,6 +14,10 @@ html { background: #1a1b20; } +.echInvisible { + visibility: hidden; +} + #story-root { padding: 20px; width: 100%; diff --git a/integration/page_objects/common.ts b/integration/page_objects/common.ts index 6d07757902..f2e9483ada 100644 --- a/integration/page_objects/common.ts +++ b/integration/page_objects/common.ts @@ -157,7 +157,7 @@ class CommonPage { async toggleElementVisibility(selector: string) { await page.$$eval(selector, (elements) => { elements.forEach((element) => { - element.classList.toggle('invisible'); + element.classList.toggle('echInvisible'); }); }); } diff --git a/src/components/_global.scss b/src/components/_global.scss index 59d48a5a83..2b68010552 100644 --- a/src/components/_global.scss +++ b/src/components/_global.scss @@ -1,7 +1,3 @@ -.invisible { - visibility: hidden; -} - .echChartStatus { visibility: hidden; pointer-events: none; diff --git a/src/components/portal/_portal.scss b/src/components/portal/_portal.scss index b175c91007..90e6ecdc71 100644 --- a/src/components/portal/_portal.scss +++ b/src/components/portal/_portal.scss @@ -7,3 +7,8 @@ position: absolute; pointer-events: none; } + +.echTooltipPortal__invisible { + position: fixed; + visibility: hidden; +} diff --git a/src/components/portal/tooltip_portal.tsx b/src/components/portal/tooltip_portal.tsx index 8b9a1b16a5..1a7a19ff05 100644 --- a/src/components/portal/tooltip_portal.tsx +++ b/src/components/portal/tooltip_portal.tsx @@ -199,7 +199,12 @@ const TooltipPortalComponent = ({ anchor, scope, settings, children, visible, ch } }, [updateAnchorDimensions, popper]); - return createPortal(