Skip to content

Copy not working when triggered inside a Vuetify dialog #18

@anzuj

Description

@anzuj

I've played around with this a while now and noticed that this composition works:

<template>
    <div>
       <v-btn v-clipboard="inviteUrl">Copy</v-btn> <!-- works -->
    </div
</template>

data: () => ({
        inviteUrl: "www.fakeurl.com",
    }),

However, when I implement a Vuetify dialog in my template, it no longer works, as in the text www.fakeurl.com does not get copied upon button press. No errors in console either.

<template>
    <v-dialog v-model="linkDialog">
        <template v-slot:activator="{ on, attrs }">
            <v-btn v-bind="attrs" v-on="on">
                Get link
            </v-btn>
        </template>

        <v-card>
            Here's your link: {{ inviteUrl }}

            <v-btn v-clipboard="inviteUrl">Copy</v-btn> <!-- doesn't work -->
        </v-card>
    </v-dialog>
</template>

Any advice on why the copy function won't work when nested in elements inside Vuetify framework elements?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions