Fix HTMX navigation from "Find Pages" dropdown#2470
Merged
Conversation
This only happens in a production-like environment, hence I need to deploy it to test
cotti
approved these changes
Jan 14, 2026
Mpdreamz
approved these changes
Jan 14, 2026
Member
Author
|
Re-requesting reviews because I changed the code significantly since the last review. I was able to reproduce the error locally with a throttled network speed in chrome. See more details in the PR description. |
Mpdreamz
approved these changes
Jan 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Clicking search results caused htmx:oobErrorNoTarget errors on slow networks. The error happened because the search popover was unmounting before htmx could complete its request.
Root cause
When the popover closed, the anchor element was removed from the DOM. htmx needs this element to exist during the entire request lifecycle.
Solution
Keep the popover mounted in the DOM, but control visibility with CSS.
isOpen={hasContent}→ Popover stays in DOM while there is search textCSS (
visibility,opacity,pointer-events) → Controls show/hideOn click: Hide popover instantly with CSS (element stays in DOM)
After htmx completes: Blur the input field
Result
Instant visual feedback when user clicks a result
htmx works reliably on all network speeds
Clean user experience