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
[4.x]: Live preview doesn't maintain scrollX on refresh #12504
Comments
👏 Thank you for the detailed reproduction steps! They were incredibly helpful. I've opened a PR to fix this up. |
Thanks for looking at this so quickly @brianjhanson! Is there any way I can get your fix before it ships? My client is currently loading a lot of content on a horizontally scrolling website 👀 E.g. if I just temporarily replace cms/src/web/assets/cp/dist/cp.js with your new version, would it cause issues next time I update? |
You can get the fix early by changing your I'd recommend getting that back to a standard constraint as soon as possible, but it should get you by until the fix is released. |
That fix is now pulled in for the next Craft 3 and 4 releases. @realjoshharrison If you were pulling in the PR branch, you can change your |
Craft 3.7.64 and 4.3.7 have been released with that fix. |
What happened?
Description
When using live preview on a page which can scroll horizontally, the page's
scrollX
is always 0 when live preview refreshes.scrollY
is maintained as expected.Steps to reproduce
scrollY
is maintained at the bottom of the page, butscrollX
has reset to 0.Expected behavior
scrollX is maintained as well as scrollY.
Actual behavior
scrollX is ignored, scrollY is maintained.
Example template code:
Browser
Google Chrome 108.0.5359.124 (Official Build) (arm64)
Reproducible with all extensions disabled
MacOS Ventura 13.0.1
Craft CMS version
4.3.6
PHP version
8.0.8
Operating system and version
MAMP Pro, Darwin 22.1.0
Database type and version
MySQL 5.7.34
Image driver and version
ImageMagick 6.9.6-2
Installed plugins and versions
The text was updated successfully, but these errors were encountered: