Skip to content

Commit

Permalink
Merge pull request #28 from TrigamDev/main
Browse files Browse the repository at this point in the history
Add more element types that are considered 'inside the dropdown'
  • Loading branch information
surjithctly authored Oct 18, 2024
2 parents 4f20cbc + 297ba69 commit dec93dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "astro-navbar",
"version": "2.3.3",
"version": "2.3.4",
"description": "Responsive Mobile Navigation with Dropdown in Astro",
"type": "module",
"exports": "./index.ts",
Expand Down
4 changes: 3 additions & 1 deletion src/Astronav.astro
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ function closeAllDropdowns(event) {
);
const isButtonInsideDropdown = [
...document.querySelectorAll(
".astronav-dropdown button, .astronav-dropdown-submenu button, #astronav-menu"
`.astronav-dropdown button, .astronav-dropdown label, .astronav-dropdown input,
.astronav-dropdown-submenu button, .astronav-dropdown-submenu label, .astronav-dropdown-submenu input,
#astronav-menu`
),
].some((button) => button.contains(event.target));
if (!isButtonInsideDropdown) {
Expand Down

0 comments on commit dec93dc

Please sign in to comment.