Strongly agree. I hit this issue only a few days ago and ended up having to set a class of "allowHoverEffects" on the html element, which I removed on touchstart, and put back again on mouseenter.
We used viewport <= the device width to remove the 300ms delay, so it has prescident for meaning "the author is catering for mobile" in regards to touch.
Hi Everyone,I realized recently that Chrome for Android (and Chrome OS) will apply hover styles after a user touches an element.I imagine this behavior is for compatibility with desktop sites which have drop down menus and require hover styles to work.If a website has a mobile viewport set, I see no reason to give an element hover state, i.e. a developer making a site for mobile devices should assume there is no hover state.By applying this state after a touch, a developer has to expect any hover styles to stick on mobile. This means adding styles for a pointer hover indicating a button is interactable, can't be separated from an active state when touched on a mobile device.Looking at IE10 on Windows Phone, they don't set any hover styles for mobile sites.
If anyone has a touch Windows Laptop, I'd be curious to know what behaviors you see on hover, focus and active states on http://jsbin.com/qahilulu/quiet.
I propose that for websites with a viewport <= the device width we reserve hover for devices with some notion of a hovering pointer (i.e. finger or stylus not touching the screen, mouse or graphics tablet which rely on a pointer) and for touches we simply apply the active state.
Worst case and we believe we really need to preserve compat here,
I'm OK with using the viewport in the heuristic. It'll be a little odd though (this is a blink decision, and the viewport isn't really known to blink).
And I'm sure we'll still get people complaining that Chrome Android is very different from Mobile Safari and Android browser.
On Fri, May 2, 2014 at 5:14 PM, Rick Byers <rby...@chromium.org> wrote:
Worst case and we believe we really need to preserve compat here,Removing hover for all touch devices would be great, is there a test we can run?
I'm OK with using the viewport in the heuristic. It'll be a little odd though (this is a blink decision, and the viewport isn't really known to blink).How was this achieved with the 300ms delay?
And I'm sure we'll still get people complaining that Chrome Android is very different from Mobile Safari and Android browser.I'm not so sure, there isn't a lot of love for how Mobile Safari handles hover https://www.google.co.uk/search?q=hover+ios+safari
I agree with Rick that the #1 priority here should be making mobile-focused web developers' lives easier (because it moves the web forward). Compatibility with legacy content is important but lower priority. Given that, I think it makes sense to try to never set :hover on touch devices and see what breaks.
input-dev has a lot on its plate for this quarter. How involved would this change be? I expect the technical bit would be straightforward, but reviewing feedback and compatibility issues may take time.
Polymer UI elements (e.g. the demo in app-widgets) have components that work on both desktop and mobile, and as such they have :hover and :active pseudo-classes that are different.Are you saying that on a slow tap we won't ever fire :hover, only :active, or at least fire them both in the same frame? If so, then you're right this isn't a concern for over-invalidation. In my conversation with Ojan yesterday we weren't clear on the exact behavior so perhaps we misunderstood what it was doing.