question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: Content Scroll doesn't work with ion-tabs

See original GitHub issue

Bug Report

Ionic version:

[x] 4.x

Current behavior:

After putting in ion-tabs into the project and running on Android the page doesn’t scroll

Expected behavior:

to be able to scroll to see overflow

Steps to reproduce:

put in ion-tabs in a project that has to be scrolled horizontally Related code:

<ion-header no-border>
  <ion-toolbar>
    <ion-buttons slot="start">
      <ion-menu-button></ion-menu-button>
    </ion-buttons>
    <ion-title text-center> ¡Hola {{ userInfo.firstNames }}! </ion-title>
    <ion-button fill="clear" class="header-right" (click)="showNotifications($event)">
    </ion-button>
  </ion-toolbar>
</ion-header>
<ion-content>
  //stuff here
</ion-content>

<ion-tabs>
  <ion-tab-bar slot="bottom">
    <ion-tab-button tab="tab1">
      <ion-icon name="flash"></ion-icon>
      <ion-label>Tab One</ion-label>
    </ion-tab-button>

    <ion-tab-button tab="tab2">
      <ion-icon name="apps"></ion-icon>
      <ion-label>Tab Two</ion-label>
    </ion-tab-button>

    <ion-tab-button tab="tab3">
      <ion-icon name="send"></ion-icon>
      <ion-label>Tab Three</ion-label>
    </ion-tab-button>
  </ion-tab-bar>
</ion-tabs>

Other information:

I’ve read that this was fixed earlier as well as this Stackoverflow Also, within my application I initialized the app with the side menu flag. However, there is one section (the home section) that I want to give them quick access to either home or their profile section rather than using the side-menu exclusively

Ionic info:

Ionic:

   Ionic CLI                     : 5.0.1 (/Users/c.francia/.nvm/versions/node/v12.1.0/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.4.2
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.3.9
   @ionic/angular-toolkit        : 1.4.1

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 7.1.4, ios 4.5.5
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 8 other plugins)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
MoAsmarcommented, Nov 17, 2019

Thanks for not replying, was very helpful. If anyone encounters this issue I have resolved it, you can read my solution and explanation on StackOverflow here:

Sorry @JamesSlater I am just arriving back to the office from vacation, and make it an effort to not do anything work related while on vacation with my family. I still have the same issue, but, I found awork around by just placing buttons in the <ion-footer> that would act like tabs.

You have to wrap it with ion-toolbar tag, it works for me, thanks @JamesSlater

<ion-header no-border>
  <ion-toolbar>
    <ion-buttons slot="start">
      <ion-menu-button></ion-menu-button>
    </ion-buttons>
    <ion-title text-center> ¡Hola {{ userInfo.firstNames }}! </ion-title>
    <ion-button fill="clear" class="header-right" (click)="showNotifications($event)">
    </ion-button>
  </ion-toolbar>
</ion-header>
<ion-content>
  //stuff here
</ion-content>

<!-- \/ -->
<ion-toolbar>
  <ion-tabs>
    <ion-tab-bar slot="bottom">
      <ion-tab-button tab="tab1">
        <ion-icon name="flash"></ion-icon>
        <ion-label>Tab One</ion-label>
      </ion-tab-button>

      <ion-tab-button tab="tab2">
        <ion-icon name="apps"></ion-icon>
        <ion-label>Tab Two</ion-label>
      </ion-tab-button>

      <ion-tab-button tab="tab3">
        <ion-icon name="send"></ion-icon>
        <ion-label>Tab Three</ion-label>
      </ion-tab-button>
    </ion-tab-bar>
  </ion-tabs>
</ion-toolbar>
4reactions
JamesSlatercommented, Aug 27, 2019

Thanks for not replying, was very helpful. If anyone encounters this issue I have resolved it, you can read my solution and explanation on StackOverflow here:

Read more comments on GitHub >

github_iconTop Results From Across the Web

Content scroll is not working when using ion-tabs in ionic 4
I had the same issue, and I noticed that if I added overflow-scroll=false the scroll works and with true is doesn't.
Read more >
Scroll to top when I click on tab - ionic-v3
Hi, I'd like to scroll the content of a page when I navigate ... I did that, it removes errors but the scroll...
Read more >
overscroll-behavior - CSS: Cascading Style Sheets | MDN
If you have overscroll-behavior: contain; selected, the outer container will not scroll unless you move your cursor out of the inner container ...
Read more >
ion-refresher causing fixed elements to scroll - You.com
When The bug appears when I add an ion-refresher in the ion-content when I have also some fixed elements in the page. ·...
Read more >
Ion.Tabs 1.0.2. jQuery tabs plugin. Easy and well done tabs ...
jQuery-plugin for tabbed content, easy to set up, customizable view, many tab-groups on one page and ability to save tabs position.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found