Skip to content

Commit

Permalink
fix(tooltip): not rendering in IE and Edge without web animations pol…
Browse files Browse the repository at this point in the history
…yfill (#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.
  • Loading branch information
crisbeto authored and andrewseguin committed Jun 5, 2017
1 parent a240c9c commit 22746ce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/tooltip/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,9 @@ export type TooltipVisibility = 'initial' | 'visible' | 'hidden';
])
],
host: {
// Forces the element to have a layout in IE and Edge. This fixes issues where the element
// won't be rendered if the animations are disabled or there is no web animations polyfill.
'[style.zoom]': '_visibility === "visible" ? 1 : null',
'(body:click)': 'this._handleBodyInteraction()'
}
})
Expand Down

0 comments on commit 22746ce

Please sign in to comment.