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

fixes #456 dropdown open/close bug #462

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

warrenspe
Copy link

@warrenspe warrenspe commented Mar 6, 2024

fix bug causing menu to toggle #456

Either this PR or PR #452 should be merged; probably not both

Proposed changes

  • Fix a bug where multiple clicks on a dropdown trigger would cause the dropdown to open/close on the 2nd+ clicks

  • Behaviour would also occur for the select component whichleveragesthe dropdown component

  • Special consideration was given to the scenario where a select component has a label; where upon clicking the label the dropdown's _handleClick would be called, but the click event would not contain the dropdown-trigger (which is the select). Which would previously call both the _handleClick and _handleDocumentClick functions causing the same open/close behaviour

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to change).

Checklist:

  • I have read the CONTRIBUTING document.
  • My commit messages follows the conventional commit format
  • My change requires a change to the documentation, and updated it accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

fix bug causing menu to toggle

 - Fix a bug where multiple clicks on a dropdown trigger would cause the
    dropdown to open/close on the 2nd+ clicks

     - Behaviour would also occur for the select component which
     leverages
        the dropdown component

         - Special consideration was given to the scenario where a
         select
            component has a label; where upon clicking the label the
               dropdown's _handleClick would be called, but the click
               event
                  would not contain the dropdown-trigger (which is the
                  select).
                     Which would previously call both the _handleClick
                     and
                        _handleDocumentClick functions causing the same
                        open/close behaviour
@warrenspe warrenspe changed the title fix: issue-456 dropdown open/close bug fixes #456 dropdown open/close bug Mar 6, 2024
@wuda-io wuda-io changed the base branch from main to v2-dev March 8, 2024 19:22
Copy link
Member

@wuda-io wuda-io left a comment

Choose a reason for hiding this comment

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

LGTM

@wuda-io wuda-io merged commit a100e39 into materializecss:v2-dev Mar 8, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants