Skip to content

support indicator and disabled in chained hx-location requests - #4097

Open
MichaelWest22 wants to merge 1 commit into
bigskysoftware:four-devfrom
MichaelWest22:hx-location-chaining
Open

MichaelWest22 wants to merge 1 commit into
bigskysoftware:four-devfrom
MichaelWest22:hx-location-chaining

Conversation

@MichaelWest22

@MichaelWest22 MichaelWest22 commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Description

indicators and disabled elements can remain after hx-location does a partial replacement that does not replace the main part of the page where the indicators and disabled elements are located. we need to leave the indicators in place while the hx-location does its request as the request cycle is not yet finished which leads to this issue. So to fix this properly we can chain the indicators and disabled elements into the next ajax request by moving these into the ctx object instead of private closures. With this change they stay as tracked and get removed cleanly when the hx-location request completes.

Corresponding issue:
#4090

Testing

Tests needed updating a bit for the new ctx system and added a test for hx-location chaining.

Checklist

  • I have read the contribution guidelines
  • I have targeted this PR against the correct branch (master for website changes, dev for
    source changes)
  • This is either a bugfix, a documentation update, or a new feature that has been explicitly
    approved via an issue
  • I ran the test suite locally (npm run test) and verified that it succeeded

@MichaelWest22 MichaelWest22 added the htmx 4 Issues specific to htmx version 4 label Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

htmx 4 Issues specific to htmx version 4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant