fix(tabs): preserve scroll position when switching between tabs
Preserves the scroll position when switching between tabs. Previously it was being reset to 0, because we detach and re-attach the content.
Fixes #6722.
@crisbeto @andrewseguin should we revisit this or close?
I think it's still a valid issue, but I haven't gotten around to finding an Android phone to test the issue that @andrewseguin mentioned.
AFAIK Chrome dev tools should mimic Android Chrome pretty well. Was it not reproducible there?
AFAIK the Chrome dev tools only resize the viewport, simulate touch events and fake the user agent.
@crisbeto Please rebase when you have a chance.
Rebased.
Hi @crisbeto! This PR has merge conflicts due to recent upstream merges. Please help to unblock it by resolving these conflicts. Thanks!
Hey @crisbeto - if you don't mind rebasing, we can try to get this pushed in
It's good to go now @andrewseguin.
Also, do you mind adding in this example to the Material Examples? We don't currently have a good example of scrolling content in our tabs and it can be used to double-check the functionality
https://stackblitz.com/edit/angular-vtgxfn?file=main.ts
Done @andrewseguin.
Any news?
(revisiting old PRs) Keeping this one open since we still want to land it, but still lower priority than other issues.