Skip to content

Commit

Permalink
fix(tooltip): fixed tooltip not disappearing on mobile (reactstrap#1083)
Browse files Browse the repository at this point in the history
I tested this on iOS and the proper behavior is observed. I hope clearing the show timeout is on the right track. 

Closes reactstrap#1004
  • Loading branch information
nathanbacon authored and TheSharpieOne committed Jun 19, 2018
1 parent baee9a4 commit e6a1313
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ class Tooltip extends React.Component {
if (!this.props.isOpen) {
this.toggle();
}
} else if (this.props.isOpen && e.target.getAttribute('role') !== 'tooltip') {
if (this._showTimeout) {
this.clearShowTimeout();
}

this._hideTimeout = setTimeout(this.hide, this.getDelay('hide'));
}
}

Expand Down

0 comments on commit e6a1313

Please sign in to comment.