jgallen23/toc — Issue #1: Clicking on menu items that scroll to near the bottom of the document highlight the wrong menu item
Author: brendanheywood
Created: 2012-02-28 22:52:10+00:00
State: open

Test case:

http://projects.jga.me/toc/#toc0

Click on any menu item that refers to an item that is within one page height of the bottom of the document, so on my screen these include History down to Contributions. It then smooth scrolls down to this item, but then when the menu highlight code kicks in it detects that it is only up to the Example CSS section which is the first section visible on the page.

I'd just test if the page bottom was hit as part of the scroll and if so explicitly set the menu item to highlight the on that was just clicked and not do the current location detection.