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

On IOS Safari, md-button needs to click twice #1847

Closed
johnqiuwan opened this issue Nov 13, 2016 · 13 comments
Closed

On IOS Safari, md-button needs to click twice #1847

johnqiuwan opened this issue Nov 13, 2016 · 13 comments
Assignees

Comments

@johnqiuwan
Copy link

johnqiuwan commented Nov 13, 2016

dup #1792

@crisbeto
Copy link
Member

Have you tried the solution from #1792?

@johnqiuwan
Copy link
Author

johnqiuwan commented Nov 14, 2016

First, I have updated the version to @angular/material": "^2.0.0-alpha.10
Also, I have update the code in the files based on the instruction of #1792 (https://github.com/angular/material2/pull/1792/files/c0f4d3de106045fba336f37737247788f33484a3#diff-750d8b0165eb725928c42839553a022b).

However, the problem is still exist. It looks like the issue ONLY exists on md-button but not on md-raised-button.

@crisbeto
Copy link
Member

crisbeto commented Nov 14, 2016

I'll give it another look. Regarding this:

... It looks like the issue ONLY exists on md-button but not on md-raised-button.

If you comment out this line, does the md-button start working?

@crisbeto crisbeto self-assigned this Nov 14, 2016
@crisbeto
Copy link
Member

crisbeto commented Nov 14, 2016

Could you post a simplified example @johnqiuwan? I've been trying this out locally against the master branch and it works fine, both on raised buttons and on regular ones:

Click counter: {{ clickCounter }}
<button md-button (click)="clickCounter=clickCounter+1" color="primary">Click</button>
<button md-raised-button (click)="clickCounter=clickCounter+1" color="primary">Click</button>

@johnqiuwan
Copy link
Author

Hi @crisbeto,

<div class="banner-button">
    <a md-button (click)="showLoginModal = true" >Register Now</a>
</div>

Only on ios, the "click" not been caught on the first click but on the second click. If I use md-raised-button instead of md-button, the problem is gone.

In addition, it has no issue on Android and Web.

@crisbeto
Copy link
Member

Hmm, I hadn't tried with a link, I was only testing with button. Does the .banner-button class have any special styling (:hover, :active etc.)?

@johnqiuwan
Copy link
Author

I just enable / disable the :hover on the .banner-button class. However, it is not working on both cases on ios. No matter the .banner-button class has a :hover or not.

@crisbeto
Copy link
Member

I see, I'll try it out with links later.

@crisbeto
Copy link
Member

Still works fine @johnqiuwan, I used the exact same HTML. It might be better to revisit this once the fix in master has been released.

@crisbeto
Copy link
Member

crisbeto commented Dec 8, 2016

@johnqiuwan alpha.11 was released with the fix for this. Can you give it another shot?

@crisbeto
Copy link
Member

It's been a while since the last response and it has been 2 releases since the fix for this was released. I'll close the issue, but it can always be re-opened if it's still a problem.

@johnqiuwan
Copy link
Author

Sorry for the late reply. I have confirmed that the alpha.11 fixes the bug

Thank you for your great work : )

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants