authorgravatar for 97427849+flamboh@users.noreply.github.comoliver <97427849+flamboh@users.noreply.github.com> 2026-10-10 00:23:15-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-10-10 02:23:15-05:00
log42f71dfe0768ee768283d50140e7d360a635ee28
tree9d5e3f406c4482b0007b5a30d36bb2c02f725570
parent500cb4266f2bb290aba2c2038295500ff7b25188
signature Signed by PGP key B5690EEEBB952194

fix(web): PR search keeps the caret where you type (#17675)


1 files changed, 8 insertions(+), 2 deletions(-)

apps/web/src/components/pullRequest/PullRequestListFilters.tsx+8-2
......@@ -104,6 +104,7 @@ export function PullRequestSearchInput({
104104 busy?: boolean;
105105 onChange: (value: string) => void;
106106}) {
107 const [draft, setDraft] = useState<string | null>(null);
107108 return (
108109 <InputGroup className="min-w-0 flex-1 **:[input]:h-9 sm:**:[input]:h-8">
109110 <InputGroupAddon>
......@@ -111,8 +112,13 @@ export function PullRequestSearchInput({
111112 </InputGroupAddon>
112113 <InputGroupInput
113114 type="search"
114 value={value}
115 onChange={(event) => onChange(event.currentTarget.value)}
115 value={draft ?? value}
116 onFocus={() => setDraft(value)}
117 onBlur={() => setDraft(null)}
118 onChange={(event) => {
119 setDraft(event.currentTarget.value);
120 onChange(event.currentTarget.value);
121 }}
116122 placeholder="Search pull requests, or label:bug"
117123 aria-label="Search pull requests"
118124 />