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

Issue when using WP preview Tablet and Mobile sizes #4

Open
nickfmc opened this issue Jun 29, 2023 · 6 comments
Open

Issue when using WP preview Tablet and Mobile sizes #4

nickfmc opened this issue Jun 29, 2023 · 6 comments

Comments

@nickfmc
Copy link

nickfmc commented Jun 29, 2023

When switching the preview mode to tablet/mobile and back all blocks that have animations enabled will disappear and not come back, without refreshing the page. This becomes an issue because a lot of gutenberg plugins use these previews as a way to set responsive settings. --- related to https://wordpress.org/support/topic/issues-with-mobile-editor-or-switching/#post-16858719 only issue with Firefox.

@websevendev
Copy link
Owner

I haven't been able to reproduce it.

Can you go to https://playground.wordpress.net/?plugin=animations-for-blocks&url=%2Fwp-admin%2Fpost.php%3Fpost%3D2%26action%3Dedit

It should display "Sample Page" in block editor. Add animation to a paragraph. Switch preview mode to tablet, then back to desktop. For me it works in Firefox 114.0 on Windows.

all blocks that have animations enabled will disappear and not come back, without refreshing the page

Do they also not re-appear when you switch to Code editor and back?
image

@nickfmc
Copy link
Author

nickfmc commented Jul 4, 2023

does playground.wordpress.net run natively as if you are viewing it in your browser? or is it powered by a chromium/webkit browser on the backend? I don't know I just ask because it has a windowed feel and webkit like frame around it. it's also not a do this and then this and it will disappear, its very random it seams like the more animations you have on a page the more likely it is to occur more frequently, but I don't know. I tested and yes switching to code editor and back to visual did bring them back. as does just continuing to click back and forth between preview sizes. It may also only occur when you have a slide from left/right something that has to do with x axis overflow. I can put a video together if you want to see it, but there are no console errors when it happens or anything.

@websevendev
Copy link
Owner

does playground.wordpress.net run natively as if you are viewing it in your browser?

Yes, more info here.

I can put a video together if you want to see it, but there are no console errors when it happens or anything.

That's fine, don't bother, probably not useful.

I'll look into adding a setting that disables the animations in the editor unless you explicitly press Animate block, that should solve the issue.

@nickfmc
Copy link
Author

nickfmc commented Jul 4, 2023

that would be great, or even a setting to not show animations in the editor. although I do think a preview animation button would be best, if you have a lot of animations that are on scroll back it can become a bit much when just trying to edit content. Great plugin though, was going to add the functionality to a theme I was working on and this covered everything, so thanks mate.

@websevendev
Copy link
Owner

Added in 1.1.2, you should find an option for it here:
image

Let me know if that works for you.

@nickfmc
Copy link
Author

nickfmc commented Jul 17, 2023

Ya, that solve works nice!

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

2 participants