-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When opening ToC on mobile, ensure active ToC item is scrolled into v…
…iew (#54) * When opening mobile view, scroll to the active item * Return early if nav element isn't available * update dependencies * DemoNav remove falsely copy-pasted console.error * 'subheadings are indented' simplify test DOM * reset windowWidth in between unit tests prevents side-effect leakage * emit 'open' events whenever open prop changes add test for custom open event * test toggling open state when clicking ToC menu button * change condition class:active={activeTocLi === tocItems[idx]} was class:active={activeHeading === heading} also rename handler->li_click_key_handler * ensure active ToC is in view when ToC opens on mobile * test `active heading is in into view and highlighted when opening ToC on mobile` --------- Co-authored-by: Janosh Riebesell <[email protected]>
- Loading branch information
Showing
6 changed files
with
126 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters