Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DropDownMenu] not trigger event on the page when clicking away #1177

Merged
merged 2 commits into from
Jul 17, 2015
Merged

[DropDownMenu] not trigger event on the page when clicking away #1177

merged 2 commits into from
Jul 17, 2015

Conversation

oliviertassinari
Copy link
Member

Fix #1174.

@oliviertassinari
Copy link
Member Author

@hai-cea Fix. This is much better! This also prevent expensive and useless render on touch event when the dropdownmenu is closed. (I can see the difference on cordova)

@oliviertassinari oliviertassinari changed the title [DropDownMenu] not trigger event when clicking away [DropDownMenu] not trigger event on the page when clicking away Jul 16, 2015
menuItemStyle={this.mergeAndPrefix(styles.menuItem, this.props.menuItemStyle)}
hideable={true}
visible={this.state.open}
onRequestClose={this._onMenuRequestClose}
onItemTap={this._onMenuItemClick} />
{this.state.open && <div style={styles.overlay} onTouchTap={this._onTouchTapOverlay} />}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oliviertassinari Very nice solution! Just have a small naming change on this line. For event handling I usually use: _handleOverlayTouchTap.

Sorry for the extra commit, done from my phone.
@oliviertassinari
Copy link
Member Author

@hai-cea okey

hai-cea added a commit that referenced this pull request Jul 17, 2015
[DropDownMenu] not trigger event on the page when clicking away
@hai-cea hai-cea merged commit 71122e4 into mui:master Jul 17, 2015
@hai-cea
Copy link
Member

hai-cea commented Jul 17, 2015

Thanks @oliviertassinari 👍

@oliviertassinari oliviertassinari deleted the DropDownMenu branch August 14, 2015 08:33
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Nov 10, 2020
* Fix persian examples

* Remove injected css after front-end mount

* Determine and apply styles for current orientation

* Add tests

* Support landscape for TimePicker

* Use isomorphic effect for event handler

* Fix lint errors

* Add new props to the documentation

* Fix displaying short weekdays in datepicker toolbar
@zannager zannager added the component: menu This is the name of the generic UI component, not the React module! label Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: menu This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DropdownMenu] not trigger event on the page when clicking away
3 participants