Skip to content

Conversation

@Han5991
Copy link
Contributor

@Han5991 Han5991 commented Jun 9, 2025

fixed #7939

Description

This pull request includes the following updates:

  • Refactored MenuItem tests to remove redundant cases, focusing on core interactive functionality. This enhances maintainability and simplifies future updates.
  • Fixed mousedown behavior handling in the MenuItem component to ensure default behavior is prevented only for appropriate elements. Additional checks and tests were added to address edge cases, such as nested elements and form controls.

Han5991 added 3 commits June 10, 2025 06:27
Prevent default mousedown behavior only for non-draggable and non-interactive elements within MenuItem. Added additional checks and comprehensive tests to handle various edge cases, including nested elements and form controls.
Streamlined tests by eliminating duplicate and overly specific cases, focusing on core interactive element behavior. This improves maintainability and reduces unnecessary test complexity.
@Han5991 Han5991 changed the title Refactor and fix MenuItem component behavior [@Mantine/core] refactor and fix MenuItem component behavior Jun 9, 2025
@Han5991 Han5991 marked this pull request as draft June 10, 2025 06:51
@Han5991 Han5991 marked this pull request as ready for review June 10, 2025 22:12
@rtivital rtivital added the ? label Jun 16, 2025
@Han5991
Copy link
Contributor Author

Han5991 commented Jun 17, 2025

@rtivital ? What does label mean?

@rtivital
Copy link
Member

It means that I'm not sure about PR and need to spend more time understanding the impact and purpose of changes.

@rtivital
Copy link
Member

rtivital commented Jul 7, 2025

Thanks for submitting a PR. I've reviewed the original issue and it turned out to be invalid, this fix is not needed.

@rtivital rtivital closed this Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Menu.Item prevent children to be draggable

2 participants