15

I'm trying to scale an image with css transition upon clicking some text.

The checkmark image should animate out and in each time the link is clicked. In iPhone Chrome however the checkmark doesn't animate - simply jumps from one state to the other, seemingly ignoring the css {transition: transform 200ms}.

It seems to work everywhere except iPhone Chrome browser - I've gone through everything as best as I can but it's totally stumped me!

Codepen link: https://codepen.io/anon/pen/oqBJzr

CSS:

.checkmark {
    width: 35px;
    -webkit-transition: transform 200ms;
    transition: all 200ms;
}

.checkmark.scale {
    -webkit-transform: scale(3);
    transform: scale(3);
}

JavaScript:

function checkMarkAnim() {

    $('.checkmark').toggleClass('scale');

}

Any pointers on what has gone wrong would really help.

Thank you in advance

Update:

The suggestion to add -webkit-transition: -webkit-transform 200ms; does not seem to have resolved the problem (although I initially thought it had).

10
  • 1
    Did you try -webkit-transition: -webkit-transform 200ms;? Commented Mar 20, 2018 at 12:48
  • 1
    Yep, that should work. Due to Apple's restrictions, Chrome uses older webkit (same as Safari) on iOS, and it supports only vendor-prefixed transform. stackoverflow.com/questions/30128587/… Commented Mar 20, 2018 at 12:52
  • 1
    Thank you @adpro! Yes, that does seem to work! I had tried: -webkit-transition: transform 200ms; I didn't realise it needed -webkit-transform Commented Mar 20, 2018 at 13:02
  • 2
    I just ran into this too, looks like this was earlier this year, did you ever figure out a solution? Commented Nov 10, 2018 at 3:39
  • 1
    @HMS any updates? Commented Sep 24, 2019 at 7:32

3 Answers 3

85

After a few days of searching what actually worked for me is just Chrome restart.

Sign up to request clarification or add additional context in comments.

17 Comments

Funny, it worked as well for me. My css transform transition wasn't doing any animation no matter what, but only in Chrome for iOS. Out of despair I even tried to use the old -webkit rule and values, but it didn't help. But then I forced it to a fresh start and it worked again.
I didn't believe it would work, but... It worked
I spent like 15 minutes trying to debug my CSS, and it turns out that it was Chrome issue on iOS. Force killing and re-launching the Chrome did the trick. Thanks!
For anyone skeptical, don't dismiss this answer — it works.
I can't believe this worked... Ironically, it worked fine on mobile Safari but not Chrome (until restarting Chrome).
|
4

This is caused by a known issue in iOS.

For more information, see: https://bugs.webkit.org/show_bug.cgi?id=228333 and https://bugs.chromium.org/p/chromium/issues/detail?id=1231712

Comments

1

Please also add/keep -webkit-transition: transform 200ms;. So in the end you should have:

.checkmark {
    width: 35px;
    -webkit-transition: transform 200ms;
    -webkit-transition: -webkit-transform 200ms
    transition: all 200ms;
}

.checkmark.scale {
    -webkit-transform: scale(3);
    transform: scale(3);
}

See it here working with mobile chrome (iOS): https://codepen.io/miikaeru/pen/aMXYEb

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.