Skip to content

Conversation

@ryanburr
Copy link
Contributor

This PR fixes #41417

  • Prevents the onClick prop from being overwritten by destructing and invoking on local handler.

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

Wow, surprised we still have bugs of this class after so many years of battle testing.

@oliviertassinari oliviertassinari added type: bug It doesn't behave as expected. scope: dialog Changes related to the dialog. labels Apr 13, 2024
Copy link
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

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

Looks good. Left one comment.

@mui-bot
Copy link

mui-bot commented Apr 15, 2024

Netlify deploy preview

https://deploy-preview-41881--material-ui.netlify.app/

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 071a543

@ZeeshanTamboli ZeeshanTamboli changed the title [material-ui][Dialog] Prevent onClick from being overwritten [material-ui][Dialog] Prevent onClick on the root element from being overwritten Apr 15, 2024
Copy link
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

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

Thanks for the pull request!

@ZeeshanTamboli ZeeshanTamboli added the needs cherry-pick The PR should be cherry-picked to master after merge. label Apr 15, 2024
@ZeeshanTamboli ZeeshanTamboli merged commit 418fb02 into mui:next Apr 15, 2024
github-actions bot pushed a commit that referenced this pull request Apr 15, 2024
…overwritten (#41881)

Signed-off-by: Ryan Burr <[email protected]>
Co-authored-by: ZeeshanTamboli <[email protected]>
@ryanburr
Copy link
Contributor Author

@ZeeshanTamboli thanks for the assist!

@ryanburr ryanburr deleted the ryanburr/fix/dialog-onclick-backdrop branch April 16, 2024 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs cherry-pick The PR should be cherry-picked to master after merge. scope: dialog Changes related to the dialog. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[material-ui][Dialog] Specifying onClick prop disables backdrop clicks

4 participants