fix: replace outer <button> with <div> in TimelineTrackContent to res…#705
fix: replace outer <button> with <div> in TimelineTrackContent to res…#705kehuaWangfff wants to merge 1 commit intoOpenCut-app:mainfrom
Conversation
…olve nested button hydration error TimelineTrackContent wrapped its entire content in a <button>, while each timeline element (ElementInner) also rendered its own <button> for click handling. This created an invalid HTML structure where <button> was nested inside <button>, triggering a React hydration error: "In HTML, <button> cannot be a descendant of <button>." The outer <button> in TimelineTrackContent only handled click-to-deselect and mousedown events — it did not need button semantics. Replacing it with a <div> preserves the exact same event handling behavior while eliminating the invalid nesting. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Someone is attempting to deploy a commit to the OpenCut OSS Team on Vercel. A member of the Team first needs to authorize it. |
👷 Deploy request for appcut pending review.Visit the deploys page to approve it
|
📝 WalkthroughWalkthroughThe root element of TimelineTrackContent in the timeline track component was changed from a Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…olve nested button hydration error
TimelineTrackContent wrapped its entire content in a , while each timeline element (ElementInner) also rendered its own for click handling. This created an invalid HTML structure where was nested inside , triggering a React hydration error:
"In HTML,
cannot be a descendant of ."The outer
in TimelineTrackContent only handled click-to-deselect and mousedown events — it did not need button semantics. Replacing it with aWe are not currently accepting PRs except for critical bugs.
If this is a bug fix:
If this is a feature:
This PR will be closed. Please open an issue to discuss first.
Summary by CodeRabbit
Note: This release contains primarily internal improvements with no user-facing changes to functionality or interface.