René's URL Explorer Experiment


Title: Docs search stops working after navigating via search result (View Transitions) · Issue #712 · github/squad · GitHub

Open Graph Title: Docs search stops working after navigating via search result (View Transitions) · Issue #712 · github/squad

X Title: Docs search stops working after navigating via search result (View Transitions) · Issue #712 · github/squad

Description: Description The docs website search breaks after navigating to a search result. On first page load, clicking the search textbox works — the user can type and search. After clicking a search result (which triggers an Astro View Transition...

Open Graph Description: Description The docs website search breaks after navigating to a search result. On first page load, clicking the search textbox works — the user can type and search. After clicking a search result ...

X Description: Description The docs website search breaks after navigating to a search result. On first page load, clicking the search textbox works — the user can type and search. After clicking a search result ...

Opengraph URL: https://github.com/github/squad/issues/712

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Docs search stops working after navigating via search result (View Transitions)","articleBody":"## Description\n\nThe docs website search breaks after navigating to a search result. On first page load, clicking the search textbox works — the user can type and search. After clicking a search result (which triggers an Astro View Transition), the search textbox can no longer be focused or typed into. The only workaround is a hard refresh (Ctrl+F5).\n\n## Steps to Reproduce\n\n1. Navigate to the docs site (e.g., https://bradygaster.github.io/squad/)\n2. Click the search button or press Ctrl+K\n3. Type a query (e.g., \"agent\") and wait for results\n4. Click on any search result to navigate to that page\n5. Try to click the search button again or press Ctrl+K\n6. **Expected:** Search modal opens and the input is focused\n7. **Actual:** Nothing happens — search is completely non-functional\n\n## Root Cause\n\nThe `Search.astro` component uses a `\u003cscript define:vars>` block that captures DOM element references (`searchBtn`, `searchModal`, `searchInput`, etc.) and attaches event listeners **once** at initial script execution time. \n\nThe docs site uses Astro View Transitions (`\u003cViewTransitions />` in `BaseLayout.astro`). After a client-side navigation, Astro swaps the DOM — replacing all the elements. The old JavaScript references now point to **detached DOM nodes**, so clicks/keyboard shortcuts silently do nothing.\n\nOther components in the docs site (theme toggle, copy buttons) already handle this correctly by using `document.addEventListener('astro:page-load', initFunction)`, but the search component was missing this pattern.\n\n## Environment\n\n- Astro 5.x with View Transitions enabled\n- Pagefind search integration\n- All browsers affected (View Transitions are the root cause, not browser-specific)","author":{"url":"https://github.com/CarlosSardo","@type":"Person","name":"CarlosSardo"},"datePublished":"2026-03-31T09:11:32Z","url":"https://github.com/github/squad/issues/712"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:65e6627c-35b8-1b82-d378-5aea65282bcc
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD972:63A36:C8D18:10DF0E:6B015D6A
html-safe-nonce97300b53a151b41c044458816b60abbf99250620866a6b063c2d8573208c51c2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTcyOjYzQTM2OkM4RDE4OjEwREYwRTo2QjAxNUQ2QSIsInZpc2l0b3JfaWQiOiI3OTc1NjgzMzA5MDE3NTg3MDUwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac82397e1c3885b9a68e44e142dce1a5dbdd83a4cb5d1f87f10449e81da61ba26c
hovercard-subject-tagissue:4177446977
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/squad/712/issue_layout
twitter:imagehttps://opengraph.githubassets.com/141173ccb53cd692f0171067628c6c67d541d3039c7c44de3abb6287852a29a0/github/squad/issues/712
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/141173ccb53cd692f0171067628c6c67d541d3039c7c44de3abb6287852a29a0/github/squad/issues/712
og:image:altDescription The docs website search breaks after navigating to a search result. On first page load, clicking the search textbox works — the user can type and search. After clicking a search result ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameCarlosSardo
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/github/squad git https://github.com/github/squad.git
octolytics-dimension-user_id9919
octolytics-dimension-user_logingithub
octolytics-dimension-repository_id1151205052
octolytics-dimension-repository_nwogithub/squad
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1151205052
octolytics-dimension-repository_network_root_nwogithub/squad
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/github/squad/issues/712#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fsquad%2Fissues%2F712
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fsquad%2Fissues%2F712
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=github%2Fsquad
Reloadhttps://github.com/github/squad/issues/712
Reloadhttps://github.com/github/squad/issues/712
Reloadhttps://github.com/github/squad/issues/712
githubhttps://github.com/github
squadhttps://github.com/github/squad
Codehttps://github.com/github/squad
Issues108 (108)https://github.com/github/squad/issues
Pull requests26 (26)https://github.com/github/squad/pulls
Discussionshttps://github.com/github/squad/discussions
Actionshttps://github.com/github/squad/actions
Projectshttps://github.com/github/squad/projects
Security and qualityhttps://github.com/github/squad/security
Insightshttps://github.com/github/squad/insights
https://github.com/github/squad
New issuehttps://github.com/login?return_to=https://github.com/github/squad/issues/712
New issuehttps://github.com/login?return_to=https://github.com/github/squad/issues/712
#964https://github.com/github/squad/pull/964
#856https://github.com/github/squad/pull/856
Docs search stops working after navigating via search result (View Transitions)https://github.com/github/squad/issues/712#top
#964https://github.com/github/squad/pull/964
#856https://github.com/github/squad/pull/856
https://github.com/CarlosSardo
CarlosSardohttps://github.com/CarlosSardo
on Mar 31, 2026https://github.com/github/squad/issues/712#issue-4177446977
https://bradygaster.github.io/squad/https://bradygaster.github.io/squad/
CarlosSardohttps://github.com/CarlosSardo
on Mar 31, 2026https://github.com/github/squad/issues/712#event-24067285666
fix(docs): re-initialize search after Astro View Transitionshttps://github.com/CarlosSardo/squad/commit/25e76119be2b498fc7504f664bbf86f1ed1ce995
https://docs.github.com/articles/closing-issues-via-commit-messages
25e7611https://github.com/CarlosSardo/squad/commit/25e76119be2b498fc7504f664bbf86f1ed1ce995
https://github.com/diberry
diberryhttps://github.com/diberry
on Mar 31, 2026https://github.com/github/squad/issues/712#issuecomment-4163812885
#713https://github.com/github/squad/pull/713
https://github.com/diberry
diberryhttps://github.com/diberry
on Mar 31, 2026https://github.com/github/squad/issues/712#issuecomment-4165339803
#712https://github.com/github/squad/issues/712
#713https://github.com/github/squad/pull/713
@CarlosSardohttps://github.com/CarlosSardo
diberryhttps://github.com/diberry
on Apr 5, 2026https://github.com/github/squad/issues/712#event-24208550446
fix(docs): re-initialize search after Astro View Transitionshttps://github.com/github/squad/commit/77493c18e0116d17d20273ef91a107a183300970
https://docs.github.com/articles/closing-issues-via-commit-messages
77493c1https://github.com/github/squad/commit/77493c18e0116d17d20273ef91a107a183300970
fix(docs): re-initialize search after Astro View Transitionshttps://github.com/github/squad/commit/b96ea741da660300ec272d38388c075f6d3dbb7f
https://docs.github.com/articles/closing-issues-via-commit-messages
b96ea74https://github.com/github/squad/commit/b96ea741da660300ec272d38388c075f6d3dbb7f
fix(docs): re-initialize search after Astro View Transitionshttps://github.com/github/squad/commit/f296ff4a6c72c5660043fef4173bb36d7778ebe7
https://docs.github.com/articles/closing-issues-via-commit-messages
f296ff4https://github.com/github/squad/commit/f296ff4a6c72c5660043fef4173bb36d7778ebe7
fix(docs): re-initialize search after Astro View Transitionshttps://github.com/github/squad/commit/9649e24e716830fcdcc8189c1741be01990c1488
https://docs.github.com/articles/closing-issues-via-commit-messages
9649e24https://github.com/github/squad/commit/9649e24e716830fcdcc8189c1741be01990c1488
diberryhttps://github.com/diberry
completedhttps://github.com/github/squad/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
9f1e574https://github.com/github/squad/commit/9f1e574cc26bc85d706ea8fe73dddfb92ad2ef0e
on Apr 7, 2026https://github.com/github/squad/issues/712#event-24262413444
diberryhttps://github.com/diberry
on Apr 7, 2026https://github.com/github/squad/issues/712#event-24262587548
fix(docs): re-initialize search after Astro View Transitions (#856)https://github.com/github/squad/commit/9f1e574cc26bc85d706ea8fe73dddfb92ad2ef0e
#856https://github.com/github/squad/pull/856
https://docs.github.com/articles/closing-issues-via-commit-messages
9f1e574https://github.com/github/squad/commit/9f1e574cc26bc85d706ea8fe73dddfb92ad2ef0e
bradygasterhttps://github.com/bradygaster
on Apr 12, 2026https://github.com/github/squad/issues/712#event-24424652573
fix(docs): re-initialize search after Astro View Transitions (#712)https://github.com/github/squad/commit/9187859250b3e8535256e139b85f5dfe1ee64d6a
#712https://github.com/github/squad/issues/712
9187859https://github.com/github/squad/commit/9187859250b3e8535256e139b85f5dfe1ee64d6a
fix(docs): re-initialize search after Astro View Transitions (#712) (#…https://github.com/github/squad/commit/39186058252645c60d16daf13c5c5f086a78f692
#712https://github.com/github/squad/issues/712
#…https://github.com/github/squad/pull/964
3918605https://github.com/github/squad/commit/39186058252645c60d16daf13c5c5f086a78f692
karlis-balcershttps://github.com/karlis-balcers
on Apr 13, 2026https://github.com/github/squad/issues/712#event-24455818694
fix(docs): re-initialize search after Astro View Transitionshttps://github.com/karlis-balcers/squad/commit/a91682e967da537a4a055989996d7a72b81646f3
https://docs.github.com/articles/closing-issues-via-commit-messages
a91682ehttps://github.com/karlis-balcers/squad/commit/a91682e967da537a4a055989996d7a72b81646f3
tamirdresherhttps://github.com/tamirdresher
on Apr 21, 2026https://github.com/github/squad/issues/712#event-24709582843
fix(docs): re-initialize search after Astro View Transitions (#856)https://github.com/github/squad/commit/7de4079cbbaacb55864139556b214d3926f60ae3
#856https://github.com/github/squad/pull/856
https://docs.github.com/articles/closing-issues-via-commit-messages
7de4079https://github.com/github/squad/commit/7de4079cbbaacb55864139556b214d3926f60ae3
fix(docs): re-initialize search after Astro View Transitions (#712) (#…https://github.com/github/squad/commit/7e0774bab158e80a8bf82bba2775bd988a9a3195
#712https://github.com/github/squad/issues/712
#…https://github.com/github/squad/pull/964
https://docs.github.com/articles/closing-issues-via-commit-messages
7e0774bhttps://github.com/github/squad/commit/7e0774bab158e80a8bf82bba2775bd988a9a3195
Sign up for freehttps://github.com/signup?return_to=https://github.com/github/squad/issues/712
Sign in to commenthttps://github.com/login?return_to=https://github.com/github/squad/issues/712
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.