Skip to content

fix(search): restore dialog interactions after Astro page navigation#63

Open
dobromirts wants to merge 1 commit into
masterfrom
dtsvetkov/restore-search-dialog-interaction
Open

fix(search): restore dialog interactions after Astro page navigation#63
dobromirts wants to merge 1 commit into
masterfrom
dtsvetkov/restore-search-dialog-interaction

Conversation

@dobromirts
Copy link
Copy Markdown
Contributor

Closes IgniteUI/igniteui-documentation#223

After Astro View Transitions, the DOM is replaced on each navigation. Any event listeners attached directly to dialog elements (igc-input, clear button, close button) are lost because those elements no longer exist. The _w.__searchListeners guard prevented re-attachment, so typing in the search input had no effect after navigating to a new page.

This PR converts all dialog level listeners (igcInput, clear, close, shell link click) from direct element attachment to document level event delegation using closest() checks. Since document persists across navigations, the listeners remain active regardless of DOM replacements, making search fully functional after any page transition.

@dobromirts dobromirts added the ❌ status: awaiting-test PRs awaiting manual verification label May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

❌ status: awaiting-test PRs awaiting manual verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search cannot be opened by click after navigating from sidebar

2 participants