Skip to content
Snippets Groups Projects
Commit 2368823b authored by Paul Kaplan's avatar Paul Kaplan
Browse files

Force the tooltips to close to fix touch devices

parent c1c431e5
Branches
Tags
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.
Please register or to comment