-
Notifications
You must be signed in to change notification settings - Fork 242
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
not work on vuetify dialog #98
Comments
Having the same issue since a while back. Which version of vuetify are you on? |
the latest one.. |
Well this is fixed in #23 you have to provide a container to make it work on modals. |
Use const container = document.querySelector('.v-dialog');
this.$copyText('Your text here', container).then(() => {
this.snackbar = true;
}); |
Use this config, it's work. import VueClipboard from 'vue-clipboard2';
VueClipboard.config.autoSetContainer = true;
Vue.use(VueClipboard); |
This worked for me. I am able to use a v-btn inside a v-dialog, and the contents of the clipboard are correct when I paste into a text doc.
This did not. My v-btn inside the v-dialog fires, the $copyText function fires, but the clipboard does not get updated. |
Looking at the source, the option vue-clipboard2/vue-clipboard.js Lines 3 to 18 in 8a542c5
This makes sense, because as an imperative API, it seems to me that you can't infer the So in addendum to @alfreema @orkhan-huseyn answers for the
Cheers! |
If the parent component is a "v-dialog", maybe you can add a tag like " this.$copyText('Your text', container).then(() => { |
im not sure but when i try, it not work on vuetify dialog
The text was updated successfully, but these errors were encountered: