-
Notifications
You must be signed in to change notification settings - Fork 4k
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 #805 don't blur()
the trigger after a clipboard action
#807
Fix #805 don't blur()
the trigger after a clipboard action
#807
Conversation
It's pointless to set `focus()` on the trigger first, if in the next step you're just going to `blur()` the active element anyway.
Since it's now not `blur()`ing anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me. I just left feedback to consider before merging related to the test related to the PR. Thanks a lot for the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thanks a lot for this contribution, @patrickhlauke. In the next few days, we'll be releasing this PR in a brand new version 👏👏👏
wonderful! thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! Thanks for the contribution.
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
This PR reintroduces the behavior that used to be in clipboard.js following #419 but that has since been reverted for some reason. As such, after a clipboard action, focus will remain/be on the trigger element, rather than the body. If applications rely on the focus to be gone/removed from the trigger button, they'll need to adapt to this.
The PR fulfills these requirements:
dev
branch for v2.x (or to a previous version branch), not themaster
branchfix #xxx[,#xxx]
, where "xxx" is the issue number)I didn't target v2.x branch because it looks wildly out of date.
Other information:
I'm not too hot on writing tests, so rather than just removing the check to see if focus is now on the body, it should probably explicitly check that focus remained on the trigger. However, not quite sure how to do that - my knowledge of test harnesses etc is pretty basic.
Closes #805