iOS 14.5 beta, macOS 11.3 beta safari transition bug

Hello,
I'm not sure, but I think I just found a bug in the latest version of Safari when using the scale and transition-delay properties together.

Code Block javascript
const bs = document.body.style;
bs.height = '100%';
bs.width = '100%';
const d = document.createElement('div');
const ds = d.style;
ds.position = 'absolute';
ds.inset = '0';
ds.margin = 'auto';
ds.backgroundColor = '#000';
ds.height = '50px';
ds.width = '50px';
document.body.append(d);
const zoom = () => {
ds.transitionDelay = '0.1s';
ds.transitionTimingFunction = 'cubic-bezier(0.190, 1.000, 0.220, 1.000)';
ds.transitionDuration = '0.4s';
ds.transform = 'scale(3)';
};
const exit = () => {
ds.transitionDelay = '0.5s';
ds.transitionTimingFunction = 'cubic-bezier(0.140, 1.000, 0.180, 1.000)';
ds.transitionDuration = '2s';
ds.transform = `scale(0.6) translateX(-${window.innerWidth}px)`;
};
d.addEventListener('transitionend', exit, { once: true });
setTimeout(zoom, 1000);

You can test it by creating an html file and putting the above code in a script tag.

In my case, there was no problem in previous versions of Safari (<=iOS 14.5 pb1 or <=macOS 11.3 pb2), but in the latest version of Safari in iOS & macOS public beta, objects are suddenly enlarged for 0.5 seconds of transition-delay. After that, the object returns to its original size and the transition continues.

I also tested it on Chrome, but I didn't encounter this issue.


Replies

Thanks for reporting this. This is indeed a recent regression in macOS 11.3 and iOS 14.5 betas. I have filed a bug for this in the public WebKit bug tracked at https://bugs.webkit.org/show_bug.cgi?id=222545. You can follow along for its resolution there.

In the future, feel free to file bugs like this directly on https://bugs.webkit.org/.
Do you know if this issue affects a production web site somewhere? If so, can you identify such a website? Thanks a lot.
  • It affects my website, https://michaelnthiessen.com

    The mobile menu has a transition on open that uses scale and transition-delay together, and it's broken now on 14.6 (was working correctly before).

Add a Comment