mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-13 17:57:06 +00:00
17433b63fc
Per T325086, the TOC should expand and activate the section that corresponds to the window's hash fragment. Additional changes: * Moves logic that runs on page load to determine the intersection from section observer to main.js, since the hash fragment can take precedence over the scroll position (e.g. when scrolled all the way to the bottom). * Make section observer's pause() cancel any pending intersection calculations so that it doesn't interfere with other async logic. * Moves onHeadingClick and onToggleClick logic to activate and expand a section to tableOfContents.js to facilitate unit testing this behavior with clicks and hash fragment changes. Bug: T325086 Change-Id: I8a2cf0e6a96467fae97608450b321c181155e424 |
||
---|---|---|
.. | ||
features.test.js | ||
main.test.js |