Repository navigation
Commit 3818a90
fix(scroll): guard the targeted scrollable-ancestor walk against cycles
findNearestScrollableAncestor followed parentIndex without a visited set, so a
targeted scroll on a malformed tree whose parent chain loops with no scrollable
ancestor could hang edge analysis. It now stops on a revisited index.
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent 273e341 commit 3818a90
2 files changed
Lines changed: 16 additions & 2 deletions
File tree
- packages/capture-kit/src/snapshot
- __tests__
- scroll-edge-state
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
147 | 148 | | |
148 | | - | |
| 149 | + | |
| 150 | + | |
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
152 | | - | |
| 154 | + | |
153 | 155 | | |
154 | 156 | | |
155 | 157 | | |
| |||
0 commit comments