Skip to content

Check to see if off canvas region is expanded before firing close han…#342

Merged
finnlewis merged 1 commit into2.xfrom
202511_off_canvas_check_341
Nov 18, 2025
Merged

Check to see if off canvas region is expanded before firing close han…#342
finnlewis merged 1 commit into2.xfrom
202511_off_canvas_check_341

Conversation

@anthonylindsay
Copy link
Contributor

…dler.

What does this change?

Checks to see if the off-canvas region is expanded before firing the close handler.

How to test

Right now, on a microsite, a click anywhere will fire the close handler, and focus jumps to the burger menu.

With this change, the close handler only fires if offCanvas is expanded, i.e. the mobile menu is active.

How can we measure success?

No unexpected jump to the top of the screen.

Images

No visual change.

Accessibility

Unaffected.

@markconroy
Copy link
Member

Just remembered we have this fixed and merged already in #333

Do a composer update localgovdrupal/localgov_microsites_base and you should have it.

@anthonylindsay
Copy link
Contributor Author

this'll be for version 2.x though, not version 3.x
2 is still supported, right?

Copy link
Member

@finnlewis finnlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy that this is the same as #333 (apart from single / double quotes).

@finnlewis finnlewis merged commit 2d1fb39 into 2.x Nov 18, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants