- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 79
Description
Describe the bug
There are a few modals that have scrollable elements within them, such as the note popouts and the asset manager. Scrolling within these elements and then changing focus to another modal, any scroll positions are lost and all scrollable elements are returned to their initial unscrolled state. I believe this is due to a render update on the modal when its position in modalState's modalOrder array is changed, which then causes ModalStack's visibleModals array to be reordered. I'm not sure how to go about creating a solution though.
To Reproduce
Steps to reproduce the behavior:
- Open a modal that contains a scrollable element (a long popout note is a good candidate)
- Open any other modal (client settings for example)
- Focus the scrollable modal by clicking anywhere on it, then scroll the scrollable element down.
- Focus on the other modal by clicking anywhere on it.
- The scroll position within the scrollable modal is reset.
Expected behavior
The scroll positions should be maintained, at least while the modal is visible.
Screenshots
The console on the left is printing the modalState's modalOrder array at the end of ModalSystem.focus()
out.mp4
Desktop:
- OS: gentoo linux
- Browser: ungoogled-chromium 138.0.7204.168, firefox 141.0
- Version: dev branch commit c5a3c72