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

Only update state if menu is not already open.

This makes it possible to use on iOS/touch
parent e56d69cc
No related branches found
No related tags found
No related merge requests found
......@@ -27,16 +27,12 @@ class ActionMenu extends React.Component {
this.closeTimeoutId = null;
}, CLOSE_DELAY);
}
handleToggleOpenState (e) {
if (!this.state.isOpen) {
e.stopPropagation(); // For touch start, to prevent clicking primary button
}
handleToggleOpenState () {
// Mouse enter back in after timeout was started prevents it from closing.
if (this.closeTimeoutId) {
clearTimeout(this.closeTimeoutId);
this.closeTimeoutId = null;
} else {
} else if (!this.state.isOpen) {
this.setState({
isOpen: true,
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