Tab reloading while double click the tab

I have the same problem,how to avoid reloading tabs while double click the tab ???

They fixed that issue and will releases it with Ionic 3.1.0

1 Like

ok , I got it ,thank you~

How did this solve the problem?

I add the code below to my tab page.solved my problem.

          return false;

Hi, thanks for replying!

I tried to implement your code, but it gives me an error:

Runtime Error
Uncaught (in promise): false
Error: Uncaught (in promise): false
at g (http://localhost:8100/build/polyfills.js:3:7133)
at l (http://localhost:8100/build/polyfills.js:3:6251)
at http://localhost:8100/build/polyfills.js:3:5607
at http://localhost:8100/build/polyfills.js:3:17487
at t.invoke (http://localhost:8100/build/polyfills.js:3:14529)
at Object.onInvoke (http://localhost:8100/build/main.js:4424:37)
at t.invoke (http://localhost:8100/build/polyfills.js:3:14469)
at (http://localhost:8100/build/polyfills.js:3:9741)
at http://localhost:8100/build/polyfills.js:3:6774
at t.invokeTask (http://localhost:8100/build/polyfills.js:3:15213)
at Object.onInvokeTask (http://localhost:8100/build/main.js:4415:37)
at t.invokeTask (http://localhost:8100/build/polyfills.js:3:15134)
at n.runTask (http://localhost:8100/build/polyfills.js:3:10390)
at a (http://localhost:8100/build/polyfills.js:3:5313)

Do you have any idea what it might be?


Could you show me all the code of your .ts file?..

Go edit tabs.ts in node_modules/ionic-angular/components/tabs/ at line 469

 if (viewController.component !== active.component) {
     // Otherwise, if the page we're on is not our real root
      // reset it to our default root type
      return tab.setRoot(tab.root);
1 Like

Hi, the "ionic-angular" folder does not exist on my node-modules folder.

Hey, I found the folder and change the file as you said but it did not work …

Did you try ionic serve again?

They released Ionic 3.1 so just update to 3.1: Guide: How to update to Ionic 3.X

Thanks man you solved my problem!! :grinning:

1 Like

Hi in Ionic 5 I solved this problem,
tabs.html file::

<ion-tabs #tabs (ionTabsWillChange)=“gets(tabs)”>

{{'home' | translate}}

in tabs.ts file :::
gets(tab: IonTabs) {
if ("/tabs/" + tab.getSelected() != this.router.url) {
this.router.navigateByUrl(“tabs/” + tab.getSelected());

this code worked for me. when tab selected if in children route , reload page…