From 7ca13b43410364a4ac3bd109e3215a7c26814b93 Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Wed, 23 Mar 2022 18:54:37 +1100 Subject: Prevent double-clicks from highlighting text --- src/components/TileTree.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/components') diff --git a/src/components/TileTree.vue b/src/components/TileTree.vue index f007935..c6f0061 100644 --- a/src/components/TileTree.vue +++ b/src/components/TileTree.vue @@ -176,6 +176,12 @@ export default defineComponent({ this.activeRoot = layoutNode; tryLayout(layoutNode, this.tileAreaPos, this.tileAreaDims, this.layoutOptions, true); }, + // For preventing double-clicks from highlighting text + onMouseDown(evt: Event){ + if (evt.detail == 2){ + evt.preventDefault(); + } + }, }, created(){ tryLayout(this.activeRoot, this.tileAreaPos, this.tileAreaDims, this.layoutOptions, true); @@ -188,7 +194,7 @@ export default defineComponent({