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

feat(VBtn): add retainFocusOnClick property #9046

Merged
merged 3 commits into from Sep 24, 2019
Merged

feat(VBtn): add retainFocusOnClick property #9046

merged 3 commits into from Sep 24, 2019

Conversation

dsseng
Copy link
Contributor

@dsseng dsseng commented Sep 20, 2019

Description

Add retainFocusOnClick prop.

Motivation and Context

@johnleider asked.

How Has This Been Tested?

jest + visually

Markup:

<template>
  <v-container fluid>
    <v-btn>Button</v-btn>
  </v-container>
</template>

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)

Copy link
Member

@johnleider johnleider left a comment

Choose a reason for hiding this comment

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

Add a unit test and let's get this in

@johnleider johnleider marked this pull request as ready for review September 24, 2019 00:25
@johnleider johnleider added the T: feature A new feature label Sep 24, 2019
@johnleider johnleider added this to the v2.1.0 milestone Sep 24, 2019
@johnleider johnleider changed the base branch from master to dev September 24, 2019 00:26
@johnleider johnleider merged commit 14a0acd into dev Sep 24, 2019
@johnleider johnleider deleted the feat/btn-blur branch September 24, 2019 00:26
@KaelWD
Copy link
Member

KaelWD commented Sep 24, 2019

Do we really want a massive prop for this (<v-btn retain-focus-on-click>)?

  • This really should be a global behaviour for consistency and UX
  • It's opt-in now, so probably nobody's gonna use it
  • It's opt-in but doesn't apply to fabs for some reason
  • The new default behaviour (blur) is broken:
    image

We discussed some other ways of doing this in discord:
image

MajesticPotatoe pushed a commit that referenced this pull request Sep 27, 2019
* feat(VBtn): add retainFocusOnClick property

* docs(VBtn): document retainFocusOnClick prop

* test(VBtn): expand coverage
@lock lock bot locked as resolved and limited conversation to collaborators Oct 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T: feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants