diff --git a/lib/assets/javascripts/_modules/in-page-navigation.js b/lib/assets/javascripts/_modules/in-page-navigation.js index 4e1802a5..8274c876 100644 --- a/lib/assets/javascripts/_modules/in-page-navigation.js +++ b/lib/assets/javascripts/_modules/in-page-navigation.js @@ -47,15 +47,13 @@ fragment = fragmentForFirstElementInView() } - handleChangeInActiveItem(fragment, true) + highlightActiveItemInToc(fragment) } function handleScrollEvent () { - handleChangeInActiveItem(fragmentForFirstElementInView()) - } + var fragment = fragmentForFirstElementInView() - function handleChangeInActiveItem (fragment, skipHistory) { - !skipHistory && storeCurrentPositionInHistoryApi(fragment) + storeCurrentPositionInHistoryApi(fragment) highlightActiveItemInToc(fragment) }