Auto scrolling to top of the screen on onChange ion-segment - Ionic 6

ion-segment auto scrolled to top - stackblitz

Assume we have two ion-segment tab.

STEP 1 : Please click on TAB 1, scroll it to bottom.

STEP 2 : Then click on TAB 2, page automatic get scroll to top some bottom content will be hidden.

same thing will happen while moving from TAB 2 to TAB 1

How remove this auto scrolling to top ?

Thank you !

1 Like

Hi, It’s not caused by the ionic component but in my case was caused by the “ionChange” that was changing the height of the page.

solved by putting a min-height in css for the interested div