diff --git a/components/menu/Menu.js b/components/menu/Menu.js index d8fe6515..67bc5e49 100644 --- a/components/menu/Menu.js +++ b/components/menu/Menu.js @@ -105,21 +105,32 @@ const factory = (MenuItem) => { componentWillUpdate (nextProps, nextState) { if (!this.state.active && nextState.active) { - events.addEventsToDocument({click: this.handleDocumentClick}); + events.addEventsToDocument({ + click: this.handleDocumentClick, + touchstart: this.handleDocumentClick + }); } } componentDidUpdate (prevProps, prevState) { if (prevState.active && !this.state.active) { if (this.props.onHide) this.props.onHide(); - events.removeEventsFromDocument({click: this.handleDocumentClick}); + events.removeEventsFromDocument({ + click: this.handleDocumentClick, + touchstart: this.handleDocumentClick + }); } else if (!prevState.active && this.state.active && this.props.onShow) { this.props.onShow(); } } componentWillUnmount () { - if (this.state.active) events.removeEventsFromDocument({click: this.handleDocumentClick}); + if (this.state.active) { + events.removeEventsFromDocument({ + click: this.handleDocumentClick, + touchstart: this.handleDocumentClick + }); + } clearTimeout(this.positionTimeoutHandle); clearTimeout(this.activateTimeoutHandle); } diff --git a/spec/style.scss b/spec/style.scss index 87422bf7..ac92d051 100644 --- a/spec/style.scss +++ b/spec/style.scss @@ -146,7 +146,3 @@ $offset: 1.8 * $unit; height: 40px; } } - -section { - overflow-x: scroll; -}