Skip to content

Conversation

nginx-jack
Copy link
Collaborator

Noticed that on hard page refreshes, and slower connections that I would still see the extra vertical overflow caused by coveo. I assumed it was a race condition, and wrapping the removal of atomic-relevance-inspector in a timeout, would generally resolve it. I didn't want a timeout to be the "fix" here, so I added the Mutation Observer (https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) which appears to be the safest approach.
There's an overall 5 second timeout still, in case search never renders for whatever reason.

Coveo 😞 .

Noticed that on hard page refreshes, and slower connections
that I would still see the extra vertical overflow caused by coveo.
I assumed it was a race condition, and wrapping the removal of
`atomic-relevance-inspector` in a timeout, would generally resolve it.
I didn't want a timeout to be the "fix" here, so I added the Mutation
Observer (https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver)
which appears to be the safest approach.
There's an overall 5 second timeout still, in case search never renders
for whatever reason.
@nginx-jack nginx-jack requested a review from a team as a code owner July 23, 2025 10:55
Copy link

Deploy Preview will be available once build job completes!

Name Link
😎 Deploy Preview https://frontdoor-test-docs.nginx.com/previews/nginx-hugo-theme/324/

@nginx-jack nginx-jack merged commit 9c6bb04 into mainframe Jul 23, 2025
4 checks passed
@nginx-jack nginx-jack deleted the coveo-race-condition branch July 31, 2025 12:28
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.

2 participants