ionic-team / ionic-team/ionic-framework
feat: scroll to top of view when pressing tab button
- Dominant language
- TypeScript
- Stars
- 52.7k
- Forks
- 13.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 51
Description
# Feature Request
**Ionic version:**
[x] **5.x**
**Describe the Feature Request**
Many applications scroll to top, when content inside tab page is scrolled and active tab button is pressed again (e.g. YouTube).
It would be great, if ionic could provide this feature out of the box.

**Describe Preferred Solution**
Ionic already has a global config option `statusTap: boolean`, which enables scrollTop() when status bar is pressed.
Extend global configs by `tabTap: boolean`, to provide this functionality also to tab button.
**Describe Alternatives**
currently you have to code this by your own.
Contributor guide
Research direction
Start by tracing the existing global `statusTap` configuration and its `scrollTop()` behavior, then inspect how tab buttons handle presses when their tab is already active. Done means an opt-in `tabTap` configuration is available and pressing the active tab scrolls its content to the top, with behavior matching the request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100