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: switch to onClick from onMouseDown in modal components #16847

Merged

Conversation

davidmenendez
Copy link
Contributor

@davidmenendez davidmenendez commented Jun 21, 2024

Closes #16846

switches the outside click detector event in Modal and ComposedModal from onMouseDown to onClick in order to alleviate some strange behaviors noticed with components built on ListBox inside of modal components.

Changelog

Changed

  • switched onMouseDown event to onClick in Modal and ComposedModal

Testing / Reviewing

@davidmenendez davidmenendez requested a review from a team as a code owner June 21, 2024 19:21
@davidmenendez davidmenendez changed the title fix: Modal mousedown onclick fix: switch to onClick from onMouseDown in modal components Jun 21, 2024
Copy link

netlify bot commented Jun 21, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 520a644
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/668403f4461d4e0008a3c016
😎 Deploy Preview https://deploy-preview-16847--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jun 21, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 520a644
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/668403f4fcfe7f00086e6ea1
😎 Deploy Preview https://deploy-preview-16847--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@riddhybansal riddhybansal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a fix to me !!

@davidmenendez
Copy link
Contributor Author

@tay1orjones resolved 👍

@tay1orjones
Copy link
Member

@davidmenendez would you be up for writing a small test to ensure the consumer-provided onClick is called like we expect?

@davidmenendez
Copy link
Contributor Author

@tay1orjones tests included 👍

@guidari guidari requested a review from tay1orjones June 27, 2024 12:39
Copy link
Contributor

@guidari guidari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

@davidmenendez
Copy link
Contributor Author

@tay1orjones when you have a chance 👍

@davidmenendez
Copy link
Contributor Author

@tay1orjones 👀 😬

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, was out on vacation last week 😅

@alisonjoseph alisonjoseph added this pull request to the merge queue Jul 16, 2024
Merged via the queue into carbon-design-system:main with commit b12ac2e Jul 16, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]:Unintended ListBox onClick behavior component when inside Modal
6 participants