Repository navigation
Commit 467118c
committed
Keep a new tab's late focus from taking the caret away
Opening a tab (⌘⇧B) focuses its address bar twice: once when the tab becomes active, and again
in an animation frame that newTab queues for when the panel was not yet visible. Chromium can
hold frames back for an inactive or busy window. The late focus then landed after the person,
or a test, had already moved on, and took the caret out of the composer mid-typing.
That failed CI on #293: store-desktop.spec.ts's browser-tools recovery case filled the composer
just as the late frame ran. The text went into the address bar and the composer stayed empty
(job 117782462586). The same case failed on #294's first run.
The late focus now applies only if focus has not moved since the tab opened. The new
workspace.spec.ts case holds animation frames, moves to the composer, releases the frames and
types. It failed first: the composer lost focus when the frame ran.
Coven-Harness: Claude Code / claude-opus-5-51 parent 747f793 commit 467118c
2 files changed
Lines changed: 30 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
185 | 206 | | |
186 | 207 | | |
187 | 208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
58 | 66 | | |
59 | 67 | | |
60 | 68 | | |
| |||
0 commit comments