-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
adding support for mouse events to IconMenu #1784
Conversation
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.
The onTouchTap is also supposed to be triggered by a mouse event.
Can you be more specific? |
Sure - this is my usage: 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. |
Are you starting the React-tap-event-plugin? |
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. |
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 |
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. |
It's not trivial but we could suggest to use https://github.com/ftlabs/fastclick instead. |
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>
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.