fix: cross-track drag computes target from mouse Y position

Replace hoveredTrackIdRef with Y-position calculation through
track heights from prev state. Works reliably during drag.
This commit is contained in:
2026-07-29 11:03:30 +07:00
parent 6c6a326b7d
commit 9abb0e6a50
3 changed files with 19 additions and 6 deletions
+6
View File
@@ -760,3 +760,9 @@
- **Các file ảnh hưởng:** `app/static/js/app.jsx`
- **Ghi chú/Test (nếu có):** `npm run build` — build passes.
---
### [2026-07-29 11:06] Task: Fix cross-track drag — compute target track from mouse Y
- **Tóm tắt thay đổi:** Thay `hoveredTrackIdRef` bằng tính toán target track từ mouse Y position + track heights (`prev[ti].height`). Không phụ thuộc `onMouseEnter` event có thể không fire khi drag.
- **Các file ảnh hưởng:** `app/static/js/app.jsx`
- **Ghi chú/Test (nếu có):** `npm run build` — build passes.
---