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

Focus must stay on the link/button #105

Open
PVince81 opened this issue Nov 20, 2020 · 1 comment
Open

Focus must stay on the link/button #105

PVince81 opened this issue Nov 20, 2020 · 1 comment

Comments

@PVince81
Copy link

Steps to reproduce

  1. Run the sample app
  2. Focus on the text field
  3. Now tab to the "Copy Text" button

Expected result

Keyboard focus stays on "Copy Text"

Actual result

Focus moves to the next field.

Version

Happens on vue-clipboard2 git master 8a542c5 and also on version 0.3.1

Further notes

If you remove the "v-clipboard:copy" attribute and retest you can see that the focus stays.

The problem also happens when using $copyText.

@brd6
Copy link

brd6 commented Mar 2, 2021

I have the same issue, a workaround is to reset the focus on the text field after copy.

  this.$copyText('my content').then(() => {
    this.$refs.mytextFieldInput.focus();
  });

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

No branches or pull requests

2 participants