Skip to content

Commit 820cb8d

Browse files
fix(ui): make header dropdown parent items clickable (#256)
* fix(ui): make header dropdown parent items clickable The <a> tag was wrapped in a <div role="button"> which intercepted clicks and prevented navigation. Replace the wrapper div with the <a> tag directly so it acts as both the dropdown trigger and a link. * chore: add .serena to gitignore
1 parent 92d09e8 commit 820cb8d

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,6 @@ pytest-coverage.xml
159159
# Minified files
160160
*.min.js
161161
*.min.css
162+
163+
# Serena
164+
.serena/

src/firefighter/incidents/templates/layouts/partials/header.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@
4242
{% for item in menus.main %}
4343
{% if item.children %}
4444
<li class="dropdown dropdown-hover dropdown-bottom ">
45-
<div tabindex="0" role="button" class="btn btn-ghost">
46-
<a {% if item.boost %}hx-boost="true"{% else %}hx-boost="false"{% endif %} {% if item.url %} href="{{ item.url }}"{% endif %} class="{% if item.selected %}{% endif %}">
47-
{{ item.title }}
48-
</a>
49-
</div>
45+
<a class="btn btn-ghost" {% if item.boost %}hx-boost="true"{% else %}hx-boost="false"{% endif %} {% if item.url %} href="{{ item.url }}"{% endif %}>
46+
{{ item.title }}
47+
</a>
5048
<ul tabindex="0" class="dropdown-content p-2 rounded-md z-[15] ml-0 p-2 shadow bg-base-200 dark:bg-black rounded-box w-auto">
5149
{% for child in item.children %}
5250
<li class="py-1">

0 commit comments

Comments
 (0)