vue-clipboard2 icon indicating copy to clipboard operation
vue-clipboard2 copied to clipboard

Events not being prevented

Open CHEWX opened this issue 5 years ago • 0 comments

Hi,

I'm using vue-select, to trigger this.$copyText(), however, this method is prevent vue-select do it's thing, as if it's event.stopPropagation() or something.

If I remove the method the select closes, but if not, it stays open and doesn't complete it's event.

Currently having to hack around it so vue-select finishes it's thing before this.$copyText() fires.

<v-select v-on:input="copyLink"></v-select>
copyText() {

    ...

    setTimeout( () => {
        this.$copyText( 'some text' ).then(() => this.$nuxt.$emit('displayNotification', `Link Copied!`) )
    }, 5)
}

CHEWX avatar Oct 15 '20 12:10 CHEWX