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

adding support for mouse events to IconMenu #1784

Closed

Conversation

chrisgervang
Copy link

I believe it was intended for this to work with mouse events as well as
touch events. In my project the mouse events were not working correctly
until I added this bit of code. I tested it when nested in a AppBar’s
iconElementRight and when on it’s own.

Chris Gervang added 2 commits October 2, 2015 00:47
I believe it was intended for this to work with mouse events as well as
touch events. In my project the mouse events were not working correctly
until I added this bit of code. I tested it when nested in a AppBar’s
iconElementRight and when on it’s own.
@oliviertassinari
Copy link
Member

The onTouchTap is also supposed to be triggered by a mouse event.

In my project the mouse events were not working correctly

Can you be more specific?

@chrisgervang
Copy link
Author

Sure - this is my usage:

https://github.com/chrisgervang/pickoleon/blob/master/app/src/components/PickleBrowser.jsx#L34-L37

Hmm. What I am curious about is that it seems to work in the hosted docs, but not on my machine. I don't think I'm using it differently than the docs though.

If it means anything, I'm on OSX using latest Chrome release.

@oliviertassinari
Copy link
Member

Are you starting the React-tap-event-plugin?
http://material-ui.com/#/get-started/installation

@chrisgervang
Copy link
Author

I am not. Seems weird to me that I'd need that if I'm not using touch in my app.

Upon first read of the install instructions I thought that was an optional thing, but looking at it again it does seem more like a requirement for now.

@oliviertassinari
Copy link
Member

Yes, that's required. The main benefit of it is to remove the 300ms delay of Safari iOS.

I agree, would be better to not be required. Another solution would be to use onClick and to emulate the onClick on Safari iOS

@chrisgervang
Copy link
Author

Hmm is that trivial to do?

After following the instructions IconMenu does appear to actually work. I'm going to close this PR because it doesn't seem necessary to fix right now.

@oliviertassinari
Copy link
Member

It's not trivial but we could suggest to use https://github.com/ftlabs/fastclick instead.

mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Nov 10, 2020
Bumps [rollup](https://github.com/rollup/rollup) from 1.27.0 to 2.10.2.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](rollup/rollup@v1.27.0...v2.10.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
@zannager zannager added component: Icon The React component. component: menu This is the name of the generic UI component, not the React module! labels Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Icon The React component. 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.

3 participants