-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
[Bug Report] Dialog returns focus to itself #6892
[Bug Report] Dialog returns focus to itself #6892
Comments
v-dialog has a global event listener so tab focus doesn't wrap around to the background elements (#2538). You can circumvent this by stopping the event on your element: |
That did it, thank you. |
Thx too. But I'might thnk its BUG |
I'm having the same problem but I've been using the v-clipboard library to copy strings to the clipboard when I need to construct them in a method. I tried to stop the propagation of the button event that didn't work highlighting I clearly don't understand the above fix :-)
|
@timdiacon, The stopPropagation needs to be called within the function doing the copy to clipboard logic. The way it works is it creates a temporary textarea element, sets its value to the string it needs to copy, and calls the copy on that element. The stopPropagation needs to be applied to that temporary element's 'focusin' event. It's fairly trivial to copy to clipboard and you would do fine by not using a third party library.
Hope that helps. |
Thanks Bro, |
This needs a configuration option to work with external libraries. It's easy to add a listener for one element but not if using smoething like tinyMCE: #7608 |
@KaelWD first of all, thank you for all the contributions to this awesome tool. Do you know whether this issue will be fixed soon? |
For reference: This feature was removed from 1.5, but kept in 2.0. A new prop |
Versions and Environment
Vuetify: 1.5.8
Last working version: 1.5.7
Vue: 2.6.10
Browsers: Chrome 73.0.3683.86
OS: Mac OS 10.14.3
Steps to reproduce
Try calling document.execCommand from a click event within a dialog. This method requires user interaction. Although the event is firing, its almost as though execCommand is not getting the event
Expected Behavior
Copy to clipboard just as if it is being called outside of a dialog.
Actual Behavior
Not copying to clipboard.
Reproduction Link
https://codesandbox.io/s/kk24rxzz5v
The text was updated successfully, but these errors were encountered: