Commit e7d1e70
Fix race condition with autoCenter/autoScroll during loadBlob (#4187)
Fixed a race condition where autoScroll and autoCenter would sometimes
cause the scroll position to jump to the beginning when loading a blob.
The issue occurred when renderProgress was called while the audio data
was still being loaded/decoded (duration temporarily 0 or invalid), which
triggered scrollIntoView to scroll to position 0.
The fix adds a guard to only call scrollIntoView when valid audio data
exists with a duration > 0, preventing the race condition.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent e37b915 commit e7d1e70
2 files changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
725 | 725 | | |
726 | 726 | | |
727 | 727 | | |
728 | | - | |
| 728 | + | |
| 729 | + | |
729 | 730 | | |
730 | 731 | | |
731 | 732 | | |
| |||
0 commit comments