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): resolve bug in browsers with event order disparity #10620

Merged
merged 1 commit into from
Feb 21, 2020

Conversation

maxshuty
Copy link

@maxshuty maxshuty commented Feb 19, 2020

The ordering of events in Safari/Edge/IE caused our manual blur of the input to break tabbing
through inputs. Additionally resolving duplicate blur events

"fix #10609"

Description

Fixing tabbing so that it doesn't return to the first focusable element in Safari/Edge/IE (and possibly other browsers). Additionally fixing duplicate blur event. This PR piggy backs off of this PR for 2.0 here: 5fa6a68

Motivation and Context

This change is required to fix this open issue: #10609

How Has This Been Tested?

I have updated an existing test, all tests pass, and additionally I was able to test in these environments:

  • Chrome Version 80.0.3987.106 (Official Build) (64-bit)
  • Firefox Version 73.0
  • Microsoft Edge 41.16299.1004.0
  • Internet Explorer 11 Version 11.1087.16299.0

Markup:

<template>
  <div>
    <v-text-field label="First Name"></v-text-field>
    <v-text-field label="Last Name"></v-text-field>
    <v-text-field label="Occupation"></v-text-field>
    <v-autocomplete
      v-model="model"
      :items="states"
      :label="'State'"
      prepend-icon="mdi-city"
    ></v-autocomplete>
    <v-text-field label="City"></v-text-field>
    <v-text-field label="E-mail"></v-text-field>	
  </div>
</template>

<script>
  export default {
    data () {
      return {
        isEditing: false,
        model: null,
        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 backwards compatible changes and next for non-backwards compatible 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)

The ordering of events in Safari/Edge/IE casued our manual blur of the input to break tabbing
through inputs. Additionally resolving duplicate blur events

"fix vuetifyjs#10609"
@jacekkarczmarczyk jacekkarczmarczyk added C: VSelect VSelect C: VTextField VTextField lts T: bug Functionality that does not work as intended/expected labels Feb 20, 2020
@KaelWD KaelWD merged commit 49cb28b into vuetifyjs:stable Feb 21, 2020
@KaelWD
Copy link
Member

KaelWD commented Mar 3, 2020

5fa6a68 was partially reverted with b0e4807, I've cherry-picked that back to 1.5 too with 7f86d4c

@lock lock bot locked as resolved and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: VSelect VSelect C: VTextField VTextField lts T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants