Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

material-button unresponsive on iOS #335

Closed
afpatmin opened this issue Sep 20, 2018 · 4 comments
Closed

material-button unresponsive on iOS #335

afpatmin opened this issue Sep 20, 2018 · 4 comments

Comments

@afpatmin
Copy link

Material-button has to be tapped twice before a trigger event is fired.

Device: iPhone X
Browser: Safari

@nshahan
Copy link
Contributor

nshahan commented Sep 20, 2018

I don't see this problem on iOS. Do you have a reproduction?

@afpatmin
Copy link
Author

I spoke too soon, the issue was I was using changeDetection.OnPush on an ancestor, closing

@muzuro
Copy link

muzuro commented Nov 13, 2018

I am facing same problem, I need to tap twice to call trigger on material-button . First click fire "hover" css change and only second fire "trigger" handler. Reproduced only on iOS.
I have versions:

  angular: ^5.1.0
  angular_components: ^0.10.0

iOS version: 11.3.1 (15E302), also have reproduced at 12.1 (16B92)
AppleWebKit: 605.1.15 Safari: 604.1

Here is same issue in angular/material2: angular/components#1316
Here is article desribing this problem: https://css-tricks.com/annoying-mobile-double-tap-link-issue/

UPD. Also reproduced on iPhone XS

Currently I am using workaround. I am disabling hover css, for iOS, for every button:

@supports (-webkit-overflow-scrolling: touch) {
  @include no-button-hover('.action-button')
}

@afpatmin afpatmin reopened this Nov 13, 2018
@jimmyff
Copy link

jimmyff commented Jan 21, 2019

The issue is with the hover state - material-button, tab-button and material-fab all add an ::after on :hover state. setting it's display: none fixes the issue.

This is my workaround:

::ng-deep material-button, ::ng-deep tab-button, ::ng-deep material-fab {
  &:after {
    display:none !important;
  }
}

nshahan pushed a commit that referenced this issue Apr 1, 2019
…ver for all touchscreens (only apply hover for media supporting hover).

Note: Firefox 63 (Currently used for web testing) does not support media hover. Yet the last two major versions do (64,65) so changing the screenshots for now, but spot checked it does work in Firefox.

Closes #335, #371

PiperOrigin-RevId: 237347903
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants