material-design-lite icon indicating copy to clipboard operation
material-design-lite copied to clipboard

Cannot scroll back to top with mdl-layout__header--waterfall if content area is too short

Open rubi-t8 opened this issue 11 years ago • 2 comments

MDL version: 1.0.0 Browser: Google Chrome Browser version: 43.0.2357.132 Operating system: OS X Operating system version: 10.10.4

What steps will reproduce the problem:

  1. Create a MIL page using the mdl-layout__header--waterfall header.
  2. Insert some content (mine was 655px tall)
  3. Visit page and scroll down, then back up

What is the expected result? Header shrinks and grows back when you scroll back up.

What happens instead of that? User cannot scroll back to top. Notice that the scroll bar disappears in the video below.

Video: (requires Flash player) http://ss.kobitate.com/images/MILissue.swf Note that the navbar does re-appear about half way through because I refreshed the page.

rubi-t8 avatar Jul 15 '15 00:07 rubi-t8

Do you can offer a live example? (e.g. on JSBin)

tschiela avatar Jul 15 '15 14:07 tschiela

@TheRealGitCub We actually spend considerate amount of time how to handle this in #42 (woah, double digits): You can click on the header to expand it!

A short summary: Before, we did not handle this case and when you’d end up in an endless trigger loop (You scroll, the header collapses, no you are effectively scrolled to top, so the header expands returning to the previous state, causing the header to collapse, etc etc etc).

Since scrolling past the top of the page is NOT detectable, we made the conscious decision to have the header just stay collapsed until you click. Again, read #42 for details.

surma avatar Jul 16 '15 12:07 surma