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(VSelect): change onMouseUp to handle menu toggle on mouse events #9476

Merged
merged 1 commit into from Dec 4, 2019
Merged

fix(VSelect): change onMouseUp to handle menu toggle on mouse events #9476

merged 1 commit into from Dec 4, 2019

Conversation

webstp
Copy link
Contributor

@webstp webstp commented Oct 25, 2019

Description

When append-inner was clicked, the menu could be opened but not closed, this was cause by onClick
always setting the isMenuActive to true. Made a change to only allow onMouseUp totoggle isMenuActive
state when the append-inner icon is clicked

Motivation and Context

fix #6564

How Has This Been Tested?

I create tests for the bug and ran the unit tests

Markup:

<template>
  <v-autocomplete  :items="states"></v-autocomplete>
</template>

<script>
export default {
  data () {
    return {
      states: [
          'Alabama', 'Alaska', 'American Samoa', 'Arizona',
          'Arkansas', 'California', 'Colorado', 'Connecticut',
          'Delaware', 'District of Columbia', 'Federated States of Micronesia',
          'Florida', 'Georgia', 'Guam', 'Hawaii', 'Idaho',
          'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky',
          'Louisiana', 'Maine', 'Marshall Islands', 'Maryland',
          'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi',
          'Missouri', 'Montana', 'Nebraska', 'Nevada',
          'New Hampshire', 'New Jersey', 'New Mexico', 'New York',
          'North Carolina', 'North Dakota', 'Northern Mariana Islands', 'Ohio',
          'Oklahoma', 'Oregon', 'Palau', 'Pennsylvania', 'Puerto Rico',
          'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee',
          'Texas', 'Utah', 'Vermont', 'Virgin Island', 'Virginia',
          'Washington', 'West Virginia', 'Wisconsin', 'Wyoming',
        ]
    }
  }
}
</script>

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 not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any features but makes things better)

Checklist:

  • The PR title is no longer than 64 characters.
  • The PR is submitted to the correct branch (master for bug fixes and documentation updates, dev for new features and breaking changes).
  • My code follows the code style of this project.
  • I've added relevant changes to the documentation (applies to new features and breaking changes in core library)
  • I've added new examples to the kitchen (applies to new features and breaking changes in core library)

@nekosaur
Copy link
Member

Please add Playground markup that shows the issue

@webstp
Copy link
Contributor Author

webstp commented Nov 12, 2019

Updated with Markup

@johnleider johnleider added T: bug Functionality that does not work as intended/expected and removed S: needs more information labels Nov 20, 2019
@johnleider
Copy link
Member

I'd like to get this in for v2.2. If you don't have time let me know.

@johnleider johnleider added this to the v2.2.0 milestone Dec 2, 2019
When append-inner was clicked, the menu could be openned but not closed, this was cause by onClick
always setting the isMenuActive to true. Made a change to only allow onMouseUp totoggle isMenuActive
state when the append-inner icon is clicked

fix #6564
@johnleider
Copy link
Member

Requesting final comments @vuetifyjs/core-contributors @vuetifyjs/core-team

@johnleider johnleider changed the title fix(vselect): change onMouseUp to handle menu toggle on mouse events fix(VSelect): change onMouseUp to handle menu toggle on mouse events Dec 3, 2019
@johnleider johnleider modified the milestones: v2.2.0, v2.1.x Dec 4, 2019
@johnleider johnleider merged commit 49c47ec into vuetifyjs:master Dec 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: VSelect VSelect T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report] Autocomplete menu icon doesn't close menu
4 participants