djett41 / ionic-scroll-sista

An Ionic plugin that hides the header/tabs while scrolling
MIT License
125 stars 38 forks source link

Side menu order of page navigation breaks shrinkage #18

Open WhatsThatItsPat opened 9 years ago

WhatsThatItsPat commented 9 years ago

First off, thanks for your work. Now onto the issues.

I've been troubleshooting Scroll Sista when used with the Side Menu and have come across a few issues. I'll submit them separately but I'll use the same Codepen for demonstration.

http://codepen.io/patrickmcd/pen/JYRLrb

This issue is that header shrinkage breaks depending on the order you navigate the side menu. Go to the Codepen and try the following.

Order 1:

  1. Start on A: Header shrinks
  2. Go to B: Header shrinks
  3. Go to C: Shrinking breaks

Maybe there's something wrong with C, you'll think, but they actually share the same template. Reload page and then Order 2 (just swap B and C):

  1. Start on A: Header shrinks
  2. Go to C: Header shrinks
  3. Go to B: Shrinking breaks

Now C works and B has the issue. The issue is that the 3rd page you get to doesn't work. But now try this next one. Reload page and then Order 3:

  1. Start on A: Header shrinks
  2. Go to B: Header shrinks
  3. Now return to page A: Header still works
  4. Go to C: Header works.

They are all working here, but I can break it again. Reload page and then Order 4:

  1. Start on A: Header shrinks
  2. Go to B: Header shrinks
  3. Now return to page A: Header still works
  4. Back to B: Header still works
  5. Go to C: Shrinking breaks

So it appears that if you navigate to B or C for the first time directly from A, everything is fine. But if the first time you get to B or C is not via the landing page, it breaks.