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

@media (hover: none) issue on older mobile devices #15736

Closed
Koniushok opened this issue May 17, 2019 · 13 comments
Closed

@media (hover: none) issue on older mobile devices #15736

Koniushok opened this issue May 17, 2019 · 13 comments
Labels
duplicate This issue or pull request already exists

Comments

@Koniushok
Copy link

When use android ^v7.0.1 (v8.0.x , v9.0.x ,...) button focus show background.

Expected Behavior 🤔

starting animation(ripple) then button background disappears

Current Behavior 😯

starting animation(ripple) then button background become grey

Steps to Reproduce 🕹

  1. use android ^v7.0.1
  2. click button with ripple animation
Tech Version
Material-UI v3.9.3
React v16.8.5
Browser chrome
@oliviertassinari
Copy link
Member

What browser are you using? It doesn't look like Chrome. Could it be the UC Browser with no support for touch action none?

@Koniushok
Copy link
Author

I use some browsers. Samsung Internet Browser, chrome, Mi Browser.All have this bug, but if only use android v7.0.1 and up.

@oliviertassinari
Copy link
Member

oliviertassinari commented May 17, 2019

@Koniushok It's funny because it's #15682 problem inversed.
I don't think that we can do anything about it, the @media (hover: none) CSS feature we use is not supported everywhere: https://caniuse.com/#feat=css-media-interaction

@oliviertassinari oliviertassinari added the bug 🐛 Something doesn't work label May 17, 2019
@Koniushok
Copy link
Author

For some devices this will do. For me it did not fit. But I corrected using:

@media (pointer: coarse) {
    && button:hover {
      background: none !important;
    }
  }

@oliviertassinari oliviertassinari changed the title Button focus style not delete in android @media (hover: none) issue on Android May 20, 2019
@oliviertassinari oliviertassinari changed the title @media (hover: none) issue on Android @media (hover: none) issue on older mobile devices May 20, 2019
@oliviertassinari
Copy link
Member

Let's see how popular alternatives solve the problem:

I have tried the following codepen on Android 6, Chrome 74. It works as expected. I think that we should keep the current solution we have on the master branch. I'm not aware of any better solution.

Your browser screenshot doesn't seem to use Chrome. What browser is it?

@Koniushok
Copy link
Author

I used Samsung Internet Browser v9.0.01.80

@Koniushok
Copy link
Author

Koniushok commented May 27, 2019

@Koniushok
Copy link
Author

Let's see how popular alternatives solve the problem:

I have tried the following codepen on Android 6, Chrome 74. It works as expected. I think that we should keep the current solution we have on the master branch. I'm not aware of any better solution.

Your browser screenshot doesn't seem to use Chrome. What browser is it?

http://recordit.co/YtA8nrtGc2

@oliviertassinari
Copy link
Member

oliviertassinari commented May 27, 2019

I used Samsung Internet Browser v9.0.01.80

@Koniushok Thanks. I can reproduce the problem with Samsung Internet Browser (not Chrome but uses Chromium). This browser has a higher market share than IE 11. This is concerning as the last version of Samsung Internet Browser is impacted. At the same time, we don't officially support it. The problem with the proposed fix is that it involves the pointer precision, it seems unrelated to the hover capability. I don't think that it's an option we can rely on. The Ionic strategy doesn't work either (tested). I fear we will have to wait for a fix in the browser.

Now, Material-UI API allows you to patch the generated styles, you can apply the changes in your project. There is no lock-in.

@oliviertassinari oliviertassinari added the out of scope The problem looks valid but we won't fix it (maybe we will revisit it in the future) label May 27, 2019
@Koniushok
Copy link
Author

Koniushok commented May 28, 2019

I checked browsers:

  1. uc browser v12.10.2.1164,
  2. Firefox v65.0,
  3. Chrome v74.0.3729.136,
  4. Samsung v9.0.01.80.
    All 4 browsers have this bug. Android v7.0.1+.
    I think all browser have this bug on android v7.0.1+.

@oliviertassinari
Copy link
Member

oliviertassinari commented May 28, 2019

@Koniushok Interesting, it seems to be phone related (Samsung)

OK

  • Nexus 5
  • OnePlus 6
  • Pixel 3
  • LG - G5
  • Moto X
  • iPhone X

KO https://www.ctrl.blog/entry/css-media-hover-samsung.html

  • Galaxy Note 9
  • Galaxy S8
  • Galaxy S9

@oliviertassinari
Copy link
Member

I haven't realized, It's a duplicate of #15000.

@oliviertassinari oliviertassinari added duplicate This issue or pull request already exists and removed bug 🐛 Something doesn't work out of scope The problem looks valid but we won't fix it (maybe we will revisit it in the future) labels May 29, 2019
@oliviertassinari
Copy link
Member

For reference, the only workaround we found for this problem so far is in mui/material-ui-pickers#1653 (comment) with @dmtrKovalenko.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants