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): Ensure Button to be the target of pointer events #1847

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

VincentSmedinga
Copy link
Contributor

@VincentSmedinga VincentSmedinga commented Feb 3, 2025

Describe the pull request

Thank you for contributing to the project!
Please use this template to help us handle your PR smoothly.

What

Disallows children of a Tabs.Button to become the target of pointer events.

Why

To ensure the click event always returns the button as its target.

How

Through CSS.

Checklist

Before submitting your pull request, please ensure you have done the following. Check each checkmark if you have done so or if it wasn't necessary:

  • Add or update unit tests
  • Add or update documentation
  • Add or update stories
  • Add or update exports in index.* files
  • Start the PR title with a Conventional Commit prefix, as explained here.

Additional notes

  • Adresses V0.14.0 Inconsistent MouseEvent Target in Tabs Component #1846.
  • We can release this as a 0.14.1 hotfix.
  • I considered adding a Storybook interaction test, but decided against it to keep the bugfix minimal. We should make a start with the subject, though.
  • Test this by adding onClick: (e: MouseEvent<HTMLElement>) => console.log('e.target:', e.target) to the args of the Tabs stories while importing MouseEvent from React.

@VincentSmedinga VincentSmedinga requested a review from a team as a code owner February 3, 2025 10:03
@VincentSmedinga VincentSmedinga changed the base branch from develop to main February 3, 2025 10:06
dlnr
dlnr previously approved these changes Feb 3, 2025
@github-actions github-actions bot temporarily deployed to demo-DES-1164-tabs-button-mouse-event-target February 3, 2025 11:02 Destroyed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants