unimelb / unimelb-design-system

A complete design system for the University of Melbourne
https://web.unimelb.edu.au
30 stars 12 forks source link

InPage Navigation weirdness #927

Open woowoowoo opened 6 years ago

woowoowoo commented 6 years ago

Expected behaviour

Inpage navigation has always worked very well for my training pages. The nav items change state as the page scrolled the heading to the top of the viewport. Although I've never been a fan of the way it jumps to the bottom of the page, it's never caused an issue. … until now!

Actual behaviour

On the training Assessment page (staff login): http://cms.unimelb.edu.au/training/author/assessment there are two related problems.

1) The nav items no longer correspond to the scroll position of the page. In this screen shot, the third item has changed state, even though the corresponding heading is still well outside the bottom of the viewport. By the time the third item has scrolled into view, the fifth item has changed state.

screen shot 2018-01-16 at 9 34 36 am

2) At certain screen sizes the nav disappears altogether, anchoring to the bottom of the sidebar instead of the bottom of the viewport. screen shot 2018-01-16 at 9 38 23 am

Steps to reproduce

I am able to consistently reproduce this in Mac/Chrome. I was initially able to reproduce it in Firefox, but then it started working as expected. I guess it's possible there is some sort of cached javascript in my browser, but I thought I'd document it anyway.