-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add JS to prevent focused elements being obscured
The table of contents header, which you see on smaller screens, is sticky and so can overlap elements when they are focused because the browser will only scroll to reveal elements when they are off-screen. As far as the browser knows, the header and the focused element are both onscreen. This takes an approach from the paciello group where we listen for focus events, check if the header overlaps the element in focus and scrolls to reveal it if so.
- Loading branch information
Showing
3 changed files
with
179 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,9 @@ | |
"it", | ||
"assert", | ||
"expect", | ||
"Document", | ||
"Element", | ||
"Event", | ||
"GOVUK", | ||
"lunr", | ||
"$", | ||
|
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