Commit a07a883
committed
Address Stale lastSeenValueRef causes visual regression on re-entry
When the targetValue changes while the element is out of viewport, the
else-if branch (lines 96-100) correctly snaps the display to the new
target but fails to clear lastSeenValueRef. This ref retains a stale
mid-animation value from when the element exited viewport. When the
element later re-enters viewport, the condition at line 88 evaluates
true (stale value differs from new target), causing the animation to
start from the old saved value instead of the current displayed value.
This produces a visible backward jump in the counter before it animates
forward.1 parent fb7554b commit a07a883
File tree
1 file changed
+5
-0
lines changed- special-pages/pages/new-tab/app/protections/utils
1 file changed
+5
-0
lines changedLines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
151 | 154 | | |
152 | 155 | | |
153 | 156 | | |
| |||
164 | 167 | | |
165 | 168 | | |
166 | 169 | | |
| 170 | + | |
| 171 | + | |
167 | 172 | | |
168 | 173 | | |
169 | 174 | | |
| |||
0 commit comments