mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-07 11:53:52 -05:00
When an element is obscured by the sticky nav, this method allows you to scroll the page until it is revealled. The bulk of this code was added in: https://github.com/alphagov/notifications-admin/pull/2843 to ensure elements with focus were in view. This moves that into a public method so, as well as being called by the focus event handler, it can be called directly by other code. These changes include code that adds a 'sticky-scroll-area' class to scroll areas not explicitly marked as such in the base HTML but made to be a scroll area by the sticky JS.