-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
transition:slide looks different (buggy) on Safari #4712
Comments
@palask would it be possible for you to create a REPL for this (I tried copy pasting your code but the styles are missing) so that we can reproduce this ourselves please? |
@antony Here you go: https://svelte.dev/repl/f0a579625c9f4d69978e3e87911a5ac9?version=3.21.0 |
Another way I found it useful to do this on safari (without adding css property) is don't use built-in |
Added a small fix, I'm having a little trouble setting up my local (in the linked issue). Going to try again tomorrow. |
As mentioned earlier, Safari won't recognize
|
Following @caroso1222 solution, it seems to be working with custom action as well. I'm using something like: <script>
import { slide } from "svelte/transition";
function safariWorkaround(node) {
if(navigator.appVersion.includes('Safari')) {
node.style.overflow = 'hidden';
}
}
</script>
{#if open}
<div transition:slide use:safariWorkaround>
{/if} But like mentioned in the comment here #5168 (comment) it's probably best to undo that style once transition is done. In my case it's fine |
It looks like this isn't an issue any longer. I just opened the test REPL in Safari and I'm on longer seeing the bug in the video linked above in the original post. |
To me, it is reproducible on stable Safari, but works perfectly on Technology Preview Release 203 (Safari 18.0, WebKit 20620.1.6) |
This is a well known bug in Safari around its Web Animations API. Thankfully they fixed it in later versions, that's why the newer versions work. Not sure that's anything we can do about this for older versions though – Safari really needs to move away from pinning releases on OS versions. |
Describe the bug
I am using transition:slide in order to slide in a div element after the user presses the button with the arrow pointing down. With Chrome and Firefox on Windows it looks perfect, however on Safari (iPadOS) the inner contents overlap with the button during the transition. Or to be more precise, the inner elements of #lookupAreaContent do not follow the behavior of #lookupAreaContent itself.
To Reproduce
Simplified version:
Expected behavior
Here is what it looks like on Chrome: https://streamable.com/crvf1n
And here is the buggy Safari behavior: https://streamable.com/ldb1gh
Information about your Svelte project:
Your browser and the version: Chrome 81 (correct), Safari (broken)
Your operating system: Windows 10 (correct), iPadOS 13.4.1 (broken)
Svelte version (Please check you can reproduce the issue with the latest release!): 3.20.1
Whether your project uses Webpack or Rollup: Rollup
Severity
It is just a design flaw, nothing major.
The text was updated successfully, but these errors were encountered: