Skip to content

feat(tabs): add tabTap config - #31575

Open
DwieDima wants to merge 1 commit into
ionic-team:mainfrom
DwieDima:feat/tab-tap-scroll-to-top
Open

DwieDima wants to merge 1 commit into
ionic-team:mainfrom
DwieDima:feat/tab-tap-scroll-to-top

Conversation

@DwieDima

Copy link
Copy Markdown
Contributor

Issue number: resolves #22558


What is the current behavior?

Pressing the already selected tab button does not scroll the content of the tab to the top. Apps have to write their own click listeners to do this.

What is the new behavior?

  • Adds a tabTap option to IonicConfig, similar to statusTap. It defaults to false.
  • When tabTap is enabled and the already selected tab button is pressed while the tab is at its root page, the content of the tab scrolls to the top.
  • If the tab is on a child page, the existing behavior is kept: Angular, React and Vue navigate back to the tab root and ion-tabs does nothing.
  • Supported in ion-tabs (including an ion-nav inside a tab), @ionic/angular, @ionic/react and @ionic/vue. Each framework reuses its existing check for whether the tab is at its root.

Does this introduce a breaking change?

  • Yes
  • No

Other information

The tabTap option still needs to be documented in the ionic-docs repo.

Add a `tabTap` config option that scrolls the content of a tab
to the top when its already selected tab button is pressed.

The content only scrolls when the tab is at its root page. If
the tab is on a child page, the existing behavior is kept.
Supported in ion-tabs, Angular, React, and Vue.

References ionic-team#22558
@DwieDima
DwieDima requested a review from a team as a code owner October 15, 2026 15:06
@DwieDima
DwieDima requested a review from ShaneK October 15, 2026 15:06
@vercel

vercel Bot commented Oct 15, 2026

Copy link
Copy Markdown

@DwieDima is attempting to deploy a commit to the Ionic Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added package: core @ionic/core package package: angular @ionic/angular package package: vue @ionic/vue package package: react @ionic/react package labels Oct 15, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: angular @ionic/angular package package: core @ionic/core package package: react @ionic/react package package: vue @ionic/vue package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: scroll to top of view when pressing tab button

1 participant