fix: prevent tour actions from submitting forms - #110
Conversation
|
@nrps9909 is attempting to deploy a commit to the afc163's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. Walkthrough导航面板的上一页、下一页和完成按钮新增 Changes导航按钮类型更新
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The default Tour navigation controls now avoid submitting containing forms, with regression coverage and validation passing; no actionable merge-blocking risk remains beyond normal checks and review. Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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 |
Summary
type="button"Why
Native
<button>elements default totype="submit". When a Tour popup is mounted into a form through a custom popup container, using its built-in navigation can therefore submit the unrelated form. The Close control already usestype="button"; this makes every default Tour action consistent and non-submitting.Verification
typeuseTargethook warnings)git diff --check: passedAI assistance disclosure: Codex assisted with current-master tracing, open-PR overlap checks, regression execution, and drafting. I verified the behavior, patch, snapshots, and results.
Summary by CodeRabbit
Bug Fixes
Tests