Skip to content

Commit

Permalink
Merge pull request #461 from 787acr/patch-1
Browse files Browse the repository at this point in the history
Support for older versions of firefox
  • Loading branch information
aronhelser authored Dec 13, 2018
2 parents 558ac6d + a60e9ff commit 76910c4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,15 @@ class ReactTooltip extends React.Component {
const {show} = this.state

if (show && this.tooltipRef) {
/* old IE work around */
/* old IE or Firefox work around */
if (!this.tooltipRef.matches) {
this.tooltipRef.matches = this.tooltipRef.msMatchesSelector
/* old IE work around */
if (this.tooltipRef.msMatchesSelector) {
this.tooltipRef.matches = this.tooltipRef.msMatchesSelector
} else {
/* old Firefox work around */
this.tooltipRef.matches = this.tooltipRef.mozMatchesSelector
}
}
return this.tooltipRef.matches(':hover')
}
Expand Down

0 comments on commit 76910c4

Please sign in to comment.