Skip to content

Commit

Permalink
chore(release): 3.1.1
Browse files Browse the repository at this point in the history
## [3.1.1](v3.1.0...v3.1.1) (2023-07-31)

### Bug Fixes

* fixed menue dropdown on mobile ([d91d98b](d91d98b))
  • Loading branch information
zd-svc-github-copenhagen-theme committed Jul 31, 2023
1 parent 68516ca commit 5706c9e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,10 @@
## [3.1.1](https://github.com/zendesk/copenhagen_theme/compare/v3.1.0...v3.1.1) (2023-07-31)


### Bug Fixes

* fixed menue dropdown on mobile ([d91d98b](https://github.com/zendesk/copenhagen_theme/commit/d91d98b1654bf568f9dab6178bd6e68211b94786))

# [3.1.0](https://github.com/zendesk/copenhagen_theme/compare/v3.0.6...v3.1.0) (2023-07-19)


Expand Down
2 changes: 1 addition & 1 deletion manifest.json
@@ -1,7 +1,7 @@
{
"name": "Copenhagen",
"author": "Zendesk",
"version": "3.1.0",
"version": "3.1.1",
"api_version": 3,
"default_locale": "en-us",
"settings": [
Expand Down
8 changes: 5 additions & 3 deletions script.js
Expand Up @@ -7,10 +7,12 @@

function toggleNavigation(toggle, menu) {
const isExpanded = menu.getAttribute("aria-expanded") === "true";
menu.setAttribute("aria-expanded", !isExpanded);
toggle.setAttribute("aria-expanded", !isExpanded);
}

function closeNavigation(toggle) {
function closeNavigation(toggle, menu) {
menu.setAttribute("aria-expanded", false);
toggle.setAttribute("aria-expanded", false);
toggle.focus();
}
Expand All @@ -29,7 +31,7 @@
menuList.addEventListener("keyup", (event) => {
if (event.keyCode === ESCAPE) {
event.stopPropagation();
closeNavigation(menuButton);
closeNavigation(menuButton, menuList);
}
});

Expand All @@ -50,7 +52,7 @@
element.addEventListener("keyup", (event) => {
console.log("escape");
if (event.keyCode === ESCAPE) {
closeNavigation(toggle);
closeNavigation(toggle, element);
}
});
});
Expand Down

0 comments on commit 5706c9e

Please sign in to comment.