Prerequisites
Bug description
The Cmd+K / command-palette search on the documentation website
(https://www.untitledui.com/react/components) hangs the browser tab indefinitely for
certain search strings. The whole renderer process locks up — the input stops accepting
keystrokes, the page becomes unresponsive to clicks and scrolling, and the only way out is
to force-close the tab. This is not a slow render that eventually recovers: the tab was
still frozen after 45+ seconds of waiting.
It looks query-dependent rather than a general performance problem. Queries that match
nothing at all are fine; the hang seems to happen when the query is a near miss of
indexed entries — i.e. a prefix that matches many entries plus one non-matching character.
That pattern is typical of a fuzzy-matching routine with exponential blow-up (catastrophic
backtracking or unbounded recursion) rather than a rendering issue.
Observed behaviour by query
| Query |
Result |
head |
✅ Works — shows Header navigations, Header sections, Hero header sections |
headi |
❌ Tab freezes permanently |
heaq |
❌ Tab freezes permanently |
zzzz |
✅ Works — "No results found" |
buttonz |
✅ Works — "No results found" |
So zzzz and buttonz (zero results) are handled fine, while headi / heaq
(zero results, but sharing the hea prefix with many indexed entries) hang the tab. The
freeze happens on the keystroke that turns a matching query into a non-matching one.
Steps to reproduce
- Open https://www.untitledui.com/react/components
- Press Cmd+K (or click the search icon in the sidebar) to open the search modal
- Type
head — results appear normally
- Type one more character,
i, so the query is headi
- The tab freezes immediately and never recovers (same with
heaq)
Expected behavior
The search should either show matching results or the "No results found" empty state, and
should stay responsive for any input string.
Actual behavior
The tab's renderer hangs indefinitely on the keystroke that makes the query stop matching.
The search input no longer accepts input, the page does not respond to clicks or scrolling,
and the tab has to be force-closed. Reproduced twice in two separate tabs.
Code example
N/A — this is the documentation website's search UI, not a component used in my own code.
Browser
Chrome
Device type
Desktop
Component version
N/A (documentation website, https://www.untitledui.com/react/components)
Environment details
Screenshots/Videos
No response
Console errors
Additional context
No response
Accessibility impact
Prerequisites
Bug description
The Cmd+K / command-palette search on the documentation website
(https://www.untitledui.com/react/components) hangs the browser tab indefinitely for
certain search strings. The whole renderer process locks up — the input stops accepting
keystrokes, the page becomes unresponsive to clicks and scrolling, and the only way out is
to force-close the tab. This is not a slow render that eventually recovers: the tab was
still frozen after 45+ seconds of waiting.
It looks query-dependent rather than a general performance problem. Queries that match
nothing at all are fine; the hang seems to happen when the query is a near miss of
indexed entries — i.e. a prefix that matches many entries plus one non-matching character.
That pattern is typical of a fuzzy-matching routine with exponential blow-up (catastrophic
backtracking or unbounded recursion) rather than a rendering issue.
Observed behaviour by query
headheadiheaqzzzzbuttonzSo
zzzzandbuttonz(zero results) are handled fine, whileheadi/heaq(zero results, but sharing the
heaprefix with many indexed entries) hang the tab. Thefreeze happens on the keystroke that turns a matching query into a non-matching one.
Steps to reproduce
head— results appear normallyi, so the query isheadiheaq)Expected behavior
The search should either show matching results or the "No results found" empty state, and
should stay responsive for any input string.
Actual behavior
The tab's renderer hangs indefinitely on the keystroke that makes the query stop matching.
The search input no longer accepts input, the page does not respond to clicks or scrolling,
and the tab has to be force-closed. Reproduced twice in two separate tabs.
Code example
Browser
Chrome
Device type
Desktop
Component version
N/A (documentation website, https://www.untitledui.com/react/components)
Environment details
Screenshots/Videos
No response
Console errors
Additional context
No response
Accessibility impact