Skip to content

Respect disabled history during swaps#3913

Open
scriptogre wants to merge 1 commit into
bigskysoftware:four-devfrom
scriptogre:4.0/respect-disabled-history
Open

Respect disabled history during swaps#3913
scriptogre wants to merge 1 commit into
bigskysoftware:four-devfrom
scriptogre:4.0/respect-disabled-history

Conversation

@scriptogre

Copy link
Copy Markdown
Collaborator

Description

When htmx.config.history is false, swaps still emit history update events around a no-op URL update. The history cache extension handles those events and saves the outgoing page despite history being disabled.

Return before resolving or emitting a history update when history is disabled.

Corresponding issue: none

Testing

Added an integration test that performs an hx-push-url request with history disabled and verifies the history cache stays empty.

Chromium: 1,588 passed, 0 failed, 6 skipped.

Checklist

  • I have read the contribution guidelines
  • I have targeted this PR against the correct htmx 4 development branch (four-dev)
  • This is a bugfix
  • I ran the test suite locally and verified that it succeeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant