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
No related branches found
No related tags found
No related merge requests found
...@@ -66,6 +66,7 @@ class ActionMenu extends React.Component { ...@@ -66,6 +66,7 @@ class ActionMenu extends React.Component {
handleTouchOutside (e) { handleTouchOutside (e) {
if (this.state.isOpen && !this.containerRef.contains(e.target)) { if (this.state.isOpen && !this.containerRef.contains(e.target)) {
this.setState({isOpen: false}); this.setState({isOpen: false});
ReactTooltip.hide();
} }
} }
clickDelayer (fn) { clickDelayer (fn) {
...@@ -74,6 +75,7 @@ class ActionMenu extends React.Component { ...@@ -74,6 +75,7 @@ class ActionMenu extends React.Component {
// for now all this work is to ensure the menu closes BEFORE the // for now all this work is to ensure the menu closes BEFORE the
// (possibly slow) action is started. // (possibly slow) action is started.
return event => { return event => {
ReactTooltip.hide();
this.setState({forceHide: true, isOpen: false}, () => { this.setState({forceHide: true, isOpen: false}, () => {
if (fn) fn(event); if (fn) fn(event);
setTimeout(() => this.setState({forceHide: false})); 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