Fix duplicate menu rows on HTMX navigation between depth levels
When navigating from a deeper page (e.g. day) to a shallower one (e.g. calendar) via HTMX, orphaned header rows from the deeper page persisted in the DOM because OOB swaps only replaced specific child divs, not siblings. Fix by sending empty OOB swaps to clear all header row IDs not present at the current depth. Applied to events (calendars/calendar/day/entry/admin/slots) and market (market_home/browse/product/admin). Also restore app_label in root header. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -41,6 +41,7 @@ def root_header_html(ctx: dict, *, oob: bool = False) -> str:
|
||||
cart_mini_html=ctx.get("cart_mini_html", ""),
|
||||
blog_url=call_url(ctx, "blog_url", ""),
|
||||
site_title=ctx.get("base_title", ""),
|
||||
app_label=ctx.get("app_label", ""),
|
||||
nav_tree_html=ctx.get("nav_tree_html", ""),
|
||||
auth_menu_html=ctx.get("auth_menu_html", ""),
|
||||
nav_panel_html=ctx.get("nav_panel_html", ""),
|
||||
|
||||
Reference in New Issue
Block a user