Commit f90d576
committed
fix: retry giveFocus on next animation frame for newly created blocks
When a new block is created, giveFocus() may fail because the view's
DOM element isn't mounted yet. This causes focus to fall back to the
hidden dummy input, which cannot handle arrow key scrolling.
Retry giveFocus() via requestAnimationFrame after the fallback, giving
React a chance to flush pending renders before the retry.
Fixes #2926
Signed-off-by: majiayu000 <1835304752@qq.com>1 parent 8fc4dc3 commit f90d576
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
229 | 232 | | |
230 | 233 | | |
231 | 234 | | |
| |||
0 commit comments