Fix tooltips on Safari and Firefox
Previously, tooltips appeared out of place in Safari and Firefox browsers. It seemed that using custom properties for CSS values caused this behavior (when those styles were removed, behavior was as usual). Somehow, adding a Polymer.dom.flush() before calculating the tooltip position seems to fix this problem. Bug: Issue 7161 Change-Id: Ia439d6dac1d3a2067fedbfdf56f406df41525663
This commit is contained in:
parent
9797e3850b
commit
06bd6b8fed
@ -105,6 +105,9 @@
|
||||
},
|
||||
|
||||
_positionTooltip(tooltip) {
|
||||
// This flush is needed for tooltips to be positioned correctly in Firefox
|
||||
// and Safari.
|
||||
Polymer.dom.flush();
|
||||
const rect = this.getBoundingClientRect();
|
||||
const boxRect = tooltip.getBoundingClientRect();
|
||||
const parentRect = tooltip.parentElement.getBoundingClientRect();
|
||||
|
Loading…
Reference in New Issue
Block a user