Skip to content
Snippets Groups Projects
Unverified Commit 27c1d458 authored by Paul Kaplan's avatar Paul Kaplan Committed by GitHub
Browse files

Merge pull request #2138 from paulkaplan/fix-touch-tooltips

Force the tooltips to close to fix touch devices
parents d87f5ac7 2368823b
No related branches found
No related tags found
No related merge requests found
......@@ -66,6 +66,7 @@ class ActionMenu extends React.Component {
handleTouchOutside (e) {
if (this.state.isOpen && !this.containerRef.contains(e.target)) {
this.setState({isOpen: false});
ReactTooltip.hide();
}
}
clickDelayer (fn) {
......@@ -74,6 +75,7 @@ class ActionMenu extends React.Component {
// for now all this work is to ensure the menu closes BEFORE the
// (possibly slow) action is started.
return event => {
ReactTooltip.hide();
this.setState({forceHide: true, isOpen: false}, () => {
if (fn) fn(event);
setTimeout(() => this.setState({forceHide: false}));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment