Skip to content

Commit 22746ce

Browse files
crisbetoandrewseguin
authored andcommitted
fix(tooltip): not rendering in IE and Edge without web animations polyfill (#4937)
Fixes the tooltip not being rendered in IE and Edge, if there is no web animations polyfill. When we don't animate the element, for some reason IE and Edge decide not to lay it out at all. We force the element to be shown by using the `zoom: 1` hack. Fixes #4935.
1 parent a240c9c commit 22746ce

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib/tooltip/tooltip.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,9 @@ export type TooltipVisibility = 'initial' | 'visible' | 'hidden';
338338
])
339339
],
340340
host: {
341+
// Forces the element to have a layout in IE and Edge. This fixes issues where the element
342+
// won't be rendered if the animations are disabled or there is no web animations polyfill.
343+
'[style.zoom]': '_visibility === "visible" ? 1 : null',
341344
'(body:click)': 'this._handleBodyInteraction()'
342345
}
343346
})

0 commit comments

Comments
 (0)