Tap on current tab close sub page and go to the root


I have page with tabs. Each tab page have several sub pages (Tab -> SubTab -> SubSubTab).When I am at the SubSubTab page, when I click on current tab caption, my application goes to the first page (Tab in my example). How to prevent closing current page in the tab navigation stack?

I have prepared example: http://plnkr.co/edit/pcAeUvQJDSDZ0M7wYcC5?p=preview

Click several times on button “PUSH NEW PAGE” and click on the tab with the heart icon. As you see all pushed pages are poped up to root.

I expect that all pushed pages must remain in the navigation stack and current subpage must not be changed.

Thanks in advance!


When you have several tabs, you can click on other tabs and then come back to your heart tab and you’ll keep the tab navigation history in it. But if you click a second time on your heart tab then all navigation history is erased.

If you click on the heart tab while being on this tab then all navigation history is erased. Which is the case in your demo.

It’s possible to change and play around with NavController and customize the history stack but I would recommend not to touch it.

Of cause I can do not touch it, but user can do everything.