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

[SpeedDial] blur fired before click, breaks FF Mobile #11811

Closed
vuhrmeister opened this issue Jun 11, 2018 · 7 comments · Fixed by #17301
Closed

[SpeedDial] blur fired before click, breaks FF Mobile #11811

vuhrmeister opened this issue Jun 11, 2018 · 7 comments · Fixed by #17301
Assignees
Labels
component: speed dial This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation

Comments

@vuhrmeister
Copy link

On Firefox Mobile clicking (touching) on an action doesn't have any effect.

Expected Behavior

onBlur is not called when clicking an action.

Current Behavior

On Firefox Mobile click event handler for an action is never called since onBlur is called before onClick. This sets the state to open: false. In Chrome (Mobile) it's working, onClick is called even after Dial gets closed via the onBlur handler.

Steps to Reproduce (for bugs)

https://codesandbox.io/s/1r73kv2qr3

The codesandbox is the same code as on the speed dial demo page except that I added an alert() to onBlur and onClick of the action.

Your Environment

Tech Version
Material-UI v1.2.1
React 16.4
browser Firefox Mobile
@oliviertassinari oliviertassinari added package: lab Specific to @mui/lab component: speed dial This is the name of the generic UI component, not the React module! labels Jun 11, 2018
@mbrookes
Copy link
Member

@vuhrmeister I just tested your codesandbox with FireFox mobile on iOS, and can't reproduce the issue (the onClick alert is shown). Is it possible that the Firefox event order has been fixed?

@vuhrmeister
Copy link
Author

I tested it on Android and it's still the case. I can test it on iOS tomorrow.

@vuhrmeister
Copy link
Author

Okay, tested it on iOS too, there it's working. Tested again on Android, there it's still NOT working as expected.

@acroyear
Copy link
Contributor

acroyear commented Sep 5, 2018

This may be related to what I'm seeing in #12646 ?

I just got an IOS device and the speed dial is working. It still is not for Chrome on my android and other touch-screen devices as described in that other bug.

@acroyear
Copy link
Contributor

Quick reminder on browsers on IOS: you are always running Safari, as far as the webkit engine goes. The browsers (FFX and Chrome) are wrappers around Safari's engine, providing shared bookmarks and password settings with your other mobile and desktop modes. But you aren't really running Firefox's or Chrome's actual dom and javascript engine (that is, their webviews).

This is a requirement to getting a browser on the Apple App Store, from the very beginning.

So testing FFX on IOS vs Safari on IOS and you should always see the exact same behavior. IOS is not suitable for cross-platform/browser testing in that regard.

Hmm...maybe we could all pitch in and get you a cheap $29 Android tablet? Ain't good for much, but it'll at least be good enough to test this sort of thing. :D

@jeffshaver
Copy link

This is actually happening to us on non-touch devices. We are currently running chrome Version 71.0.3578.98 (Official Build) (64-bit) and my team was having this issue. Removed the onBlur handler and everything seemed to work fine.

@eps1lon
Copy link
Member

eps1lon commented Jun 28, 2019

The onBlur on the SpeedDial will fire if the dial is blurred. If you click an element in the browser then mousedown, blur(previouslyFocused), focus(clicked), mouseup, click events are fired in that order. This means that

On Firefox Mobile click event handler for an action is never called since onBlur is called before onClick.

is expected. Ergo

onBlur is not called when clicking an action.

would not be standard behavior. Each action and the dial are separate buttons that receive individual focus and therefore blur individually.

This is likely an issue with how we document SpeedDial usage.

@eps1lon eps1lon added the docs Improvements or additions to the documentation label Jun 28, 2019
@oliviertassinari oliviertassinari self-assigned this Sep 10, 2019
@oliviertassinari oliviertassinari removed the package: lab Specific to @mui/lab label Jan 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: speed dial This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants