You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think setting a transform-origin in the zoom out CSS transform and calculating a variable on the scaling animation that checks for the current scroll offset and calculating the central point could work well. It would need to work for both zoom-in and out.
It seems like this is what #61465 is meant to solve. It seems overkill to actually center the block because that’s adjusting the scroll position instead of maintaining it. Also, it can’t work for blocks that are near the end of the canvas unless spacing is added to the end of the canvas to make enough overflow/scrolling range to center the block. Not that it would have to work for such blocks.
I’ll mention as well that #63390 maintains scroll position for free (i.e. without code managing it).
I can confirm this is occurring in 6.7 Beta 1, so I am adding it to the project board. It would be great to come up with a solution before the release.
Description
When zooming in to the canvas via double click or enter keypress on a block, it doesn't zoom to the selected block location.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Screen.Recording.2024-10-04.at.2.07.29.PM.mov
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
The text was updated successfully, but these errors were encountered: