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
When an element index finishes loading content, the page (i.e. window) scrolls (i.e. jumps) to the top of the page, which is fine. However, if the index' sources sidebar is also scrolled, that too jumps to the top, along with the rest of the window. This behaviour is disorienting to the author, and makes managing content in element indexes with too-tall-for-the-viewport source sidebars, more difficult than it should be.
This happens with both assets and entries element indexes (I didn't test categories).
Below is a video demonstrating the issue in an assets element index. In the video, I'm scrolling the sources sidebar for the assets index way down to the bottom. Then, I select one of the bottom sub folders. When the selected folder's assets are loaded in, and the element index updates, the sources sidebar has its scroll position reset.
The video was captured using Microsoft Edge 108.0.1462.76 on macOS 12.6.
CleanShot.2023-01-11.at.15.43.17.mp4
Steps to reproduce
Visit an element index; make sure that the index source sidebar is taller than the viewport so it is scrollable.
Scroll the source sidebar to the bottom, and make the element index update by selecting a source.
Expected behavior
The scroll position for the source sidebar should be retained when the element index is updated.
Actual behavior
The source sidebar's scroll position is reset when the element index updates; i.e. the source sidebar jumps to the top along with the rest of the browser window.
Craft CMS version
4.3.6.1
PHP version
8.1.12
Operating system and version
macOS 12.6
Database type and version
10.9.3-MariaDB
Image driver and version
Imagick 3.7.0 (ImageMagick 7.1.0-52)
Installed plugins and versions
None
The text was updated successfully, but these errors were encountered:
Hi, thanks for getting in touch and for the clear instructions on how to replicate this - they helped a lot!
I created a PR for it (applicable to Craft 3 and 4).
What happened?
Description
When an element index finishes loading content, the page (i.e. window) scrolls (i.e. jumps) to the top of the page, which is fine. However, if the index' sources sidebar is also scrolled, that too jumps to the top, along with the rest of the window. This behaviour is disorienting to the author, and makes managing content in element indexes with too-tall-for-the-viewport source sidebars, more difficult than it should be.
This happens with both assets and entries element indexes (I didn't test categories).
Below is a video demonstrating the issue in an assets element index. In the video, I'm scrolling the sources sidebar for the assets index way down to the bottom. Then, I select one of the bottom sub folders. When the selected folder's assets are loaded in, and the element index updates, the sources sidebar has its scroll position reset.
The video was captured using Microsoft Edge 108.0.1462.76 on macOS 12.6.
CleanShot.2023-01-11.at.15.43.17.mp4
Steps to reproduce
Visit an element index; make sure that the index source sidebar is taller than the viewport so it is scrollable.
Scroll the source sidebar to the bottom, and make the element index update by selecting a source.
Expected behavior
The scroll position for the source sidebar should be retained when the element index is updated.
Actual behavior
The source sidebar's scroll position is reset when the element index updates; i.e. the source sidebar jumps to the top along with the rest of the browser window.
Craft CMS version
4.3.6.1
PHP version
8.1.12
Operating system and version
macOS 12.6
Database type and version
10.9.3-MariaDB
Image driver and version
Imagick 3.7.0 (ImageMagick 7.1.0-52)
Installed plugins and versions
None
The text was updated successfully, but these errors were encountered: