v-select-outside

The select event fires when you select text inside a text input or textarea element.

(Hint: Select text in the inputs by double-clicking or dragging.)

v-select-outside example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<template>
    <div v-select-outside="onSelectOutside"></div>
</template>
 
<script>
    export default {
        methods: {
            onSelectOutside(e, el) {
                console.log("onSelectOutside");
                console.log("Event:", e);
                console.log("Element focus was given to:", e.target);
                console.log("Element needs to mind its own business:", el);
            }
        }
    }
</script>