DEV Community

Discussion on: Detecting Hover and Touch in CSS and JS

Collapse
 
davidcarty profile image
David-Carty

Far from perfect. My mobile phone (Galaxy S8+ ) has a mouse according to the code directly above. Yes, I was surprised but the fact remains.

Collapse
 
niorad profile image
Antonio Radovcic

I could check that and try to add this case, which Android-Version and which Browser is used?

Of course there will always be edge-cases with e.g. stylus-based devices or touch/mouse-hybrids. That's why websites shouldn't rely on hover to begin with.