Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tabs): click on navigation button in Tabs submit the form #7152

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

mihai-albu-sage
Copy link
Contributor

fixes: #7142

Proposed behaviour

Added type="button" to the Tabs navigation left and right buttons to prevent accidental form submission when the component is used inside a Form.

tabs-after.mp4

Current behaviour

When the left and right navigation buttons are used on the Tabs component and the component is inside a Form, the Form is being submitted.

tabs-before.mp4

Checklist

  • Commits follow our style guide
  • Related issues linked in commit messages if required
  • Screenshots are included in the PR if useful
  • All themes are supported if required
  • Unit tests added or updated if required
  • Playwright automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • Typescript d.ts file added or updated if required
  • Related docs have been updated if required

QA

  • Tested in provided StackBlitz sandbox/Storybook
  • Add new Playwright test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

Parsium
Parsium previously approved these changes Jan 13, 2025
added type button to the navigation buttons to prevent accidental from submission

fixes: #7142
@mihai-albu-sage mihai-albu-sage merged commit a8749d9 into master Jan 15, 2025
28 checks passed
@mihai-albu-sage mihai-albu-sage deleted the FE-7038 branch January 15, 2025 08:02
@carbonci
Copy link
Collaborator

🎉 This PR is included in version 146.4.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Click on navigation button in Tabs submit the form
5 participants