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(vautocomplete): change onClick to not reopen menu #10158

Merged
merged 2 commits into from
Feb 18, 2020
Merged

fix(vautocomplete): change onClick to not reopen menu #10158

merged 2 commits into from
Feb 18, 2020

Conversation

webstp
Copy link
Contributor

@webstp webstp commented Jan 8, 2020

Description

Change VAutocomplete's onClick event to check if the even came from the appendInner icon, this is because onMouseUp will toggle the menu for this event, so onClick would reopen the menu.

Motivation and Context

fix #6564

How Has This Been Tested?

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)

fix issue where when the append-inner slot is clicked the menu would close with the mouse up event
and then reopen with the click event

fix #6564
@johnleider
Copy link
Member

This was merged in #9476

@johnleider johnleider closed this Jan 29, 2020
@johnleider johnleider self-assigned this Jan 29, 2020
@webstp
Copy link
Contributor Author

webstp commented Jan 30, 2020

#9476 fixed the issue in VSelect, the issue still exists in VAutocomplete due to it defining its own onClick

@webstp
Copy link
Contributor Author

webstp commented Feb 12, 2020

Could we please reopen this PR as this solves a different problem than #9476. #9476 fixes the issue in VSelect while this PR fixes Autocomplete

@jacekkarczmarczyk jacekkarczmarczyk added this to the v2.2.x milestone Feb 18, 2020
@MajesticPotatoe MajesticPotatoe added C: VAutocomplete VAutocomplete T: bug Functionality that does not work as intended/expected labels Feb 18, 2020
@MajesticPotatoe MajesticPotatoe merged commit 10abc11 into vuetifyjs:master Feb 18, 2020
Logikgate pushed a commit to flypapertech/vuetify that referenced this pull request Feb 19, 2020
fix issue where when the append-inner slot is clicked the menu would close with the mouse up event
and then reopen with the click event

fix vuetifyjs#6564

Co-authored-by: Andrew Henry <AMajesticPotatoe@gmail.com>
whoistobias pushed a commit to whoistobias/vuetify that referenced this pull request Feb 26, 2020
fix issue where when the append-inner slot is clicked the menu would close with the mouse up event
and then reopen with the click event

fix vuetifyjs#6564

Co-authored-by: Andrew Henry <AMajesticPotatoe@gmail.com>
@lock lock bot locked as resolved and limited conversation to collaborators Mar 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: VAutocomplete VAutocomplete 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