Skip to content

Conversation

@yuwu9145
Copy link
Member

fixes #14010

Description

resolves #14010

Motivation and Context

resolves #14010

How Has This Been Tested?

visually

Markup:

Details
// Paste your FULL Playground.vue here
<template>
  <v-container>
    <h4>VSlider inherit is wrong</h4>
    <p>[data-test="slider"] count: {{sliderCount}}</p>
    <v-slider data-test="slider" />
    <h4>VSwitch inherit is correct</h4>
    <p>[data-test="switch"] count: {{switchCount}}</p>
    <v-switch data-test="switch" />
  </v-container>
</template>

<script>
export default {
  data: () => ({
    sliderCount: 0,
    switchCount: 0
  }),
  mounted () {
    this.sliderCount = document.querySelectorAll('[data-test="slider"]').length
    this.switchCount = document.querySelectorAll('[data-test="switch"]').length
  }
};
</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)

'aria-valuenow': this.internalValue,
'aria-readonly': String(this.isReadonly),
'aria-orientation': this.vertical ? 'vertical' : 'horizontal',
...this.$attrs,
Copy link
Member Author

@yuwu9145 yuwu9145 Sep 18, 2021

Choose a reason for hiding this comment

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

Looks like the only purpose of non-prop attributes inherit here is for making sure aria-label takes highest precedence over label prop.

In addition, with this change applied, all events (focus, blur and keydown on thumb) from ThumbContainer are consistent

@KaelWD KaelWD changed the title Fix(VSlider): remove non-prop attributes inherit from thumb container fix(VSlider): remove attributes inherit from thumb container Sep 22, 2021
@KaelWD KaelWD merged commit 50c02fd into vuetifyjs:master Sep 22, 2021
@yuwu9145 yuwu9145 deleted the fix/14010-vslider-inherit-twice branch September 22, 2021 21:25
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.

[Bug Report][2.5.7] VSlider inherit $attrs twice, in input and div container

2 participants