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

Effect flickers on webkit browsers #2

Open
nathanaeljames opened this issue May 28, 2021 · 1 comment
Open

Effect flickers on webkit browsers #2

nathanaeljames opened this issue May 28, 2021 · 1 comment

Comments

@nathanaeljames
Copy link

Hello! I love this effect and have been using it for years but noticed that recently it started glitching (flickering) on webkit browsers. Applying html{-webkit-transform:translate3d(0,0,0);} fixes the problem but causes many other problems. I opened an issue on Stack Overflow. Is there a specific element I should be applying this CSS property on?

@nathanaeljames
Copy link
Author

Upon further investigation the issue is definitely one of width and height of transitionBackground on webkit browsers, and I think the hardware acceleration trick may have just worked coincidentally. I found that when I edit the modal.js function setLayerDimensions() and manipulate layerHeight I can significantly reduce how often the effect breaks but not remove the breaking entirely. I have had the most success with rounding to the nearest even number using layerHeight = 2*Math.round(layerHeight/2); but again, this doesn't fix the breaking completely. I'm sure there is a magical setting for rounding but I'm not sure how to find it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant