Steps to replicate:
- On Mobile VE, open the Graph dialog/Media dialog
- Scroll down.
- Switch tab or just close this dialog.
- Reopen this tab again.
The scrollbar inside the dialog is still in the previous position.
Steps to replicate:
The scrollbar inside the dialog is still in the previous position.
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | • Esanders | T205948 Scroll position is always preserved when switching tab in an dialog using IndexLayout | |||
Resolved | • Esanders | T206211 Implement a scrollReset method for OOUI layouts |
This happens on desktop too, but as we usually have autofocus enabled (which is disabled on mobile to avoid the virtual keyboard), the page usually scrolls back to somewhere near the top.
The question is then do we:
What use case comes to our minds where switching tabs should not result in a start from TabPanel top and would be expected?
Say there is a tab panel with a particular long page where I have scrolled to a specific location. I then need to look something up on another tab before returning to the long tab in the same place. This is the same behaviour as browser tabs. I feel resetting scroll every time you change tabs would be unexpected.
Change 464641 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Reset scroll and tab state in media dialogs
Interesting, this is actually a browser feature and not something we implement in OOUI. The scroll position of hidden elements is restored when they are shown again. Try scrolling and using the "Swap panels" button. http://jsfiddle.net/dwLk74y1/3/
Even more interesting, it seems that setting the scroll position while the element is hidden is impossible. The previous scroll position is still restored when they are shown. Try using the "Scroll to middle" button and note that the hidden panel is not scrolled.
Change 464641 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Reset scroll and tab state when closing dialogs
Not seeing the fix on Beta cluster yet. Moving it to stalled until it's ready to test.
Change 472244 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/Graph@master] Reset scroll when closing dialog
Change 472244 merged by jenkins-bot:
[mediawiki/extensions/Graph@master] Reset scroll when closing dialog