From 9af2d15cefc7764e9f141018435233e07e3e4060 Mon Sep 17 00:00:00 2001 From: Deep Tailor Date: Thu, 14 Jan 2021 11:45:28 -0800 Subject: [PATCH] Fix tree click preview in edit mode (#3645) * fix non preview issue * fix lint warnings that were left over in master --- src/ui/components/ObjectLabel.vue | 3 ++- src/ui/inspector/styles/FontStyleEditor.vue | 4 ++-- src/ui/layout/tree-item.vue | 3 +-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ui/components/ObjectLabel.vue b/src/ui/components/ObjectLabel.vue index 35eea137e5..9102734fb4 100644 --- a/src/ui/components/ObjectLabel.vue +++ b/src/ui/components/ObjectLabel.vue @@ -3,7 +3,6 @@ class="c-tree__item__label c-object-label" :class="[statusClass]" draggable="true" - :href="objectLink" @dragstart="dragStart" @click="navigateOrPreview" > @@ -84,6 +83,8 @@ export default { event.preventDefault(); this.preview(); } + + window.location.assign(this.objectLink); }, preview() { if (this.previewAction.appliesTo(this.objectPath)) { diff --git a/src/ui/inspector/styles/FontStyleEditor.vue b/src/ui/inspector/styles/FontStyleEditor.vue index 70ed1ad8c1..0e0ff91d09 100644 --- a/src/ui/inspector/styles/FontStyleEditor.vue +++ b/src/ui/inspector/styles/FontStyleEditor.vue @@ -1,15 +1,15 @@ diff --git a/src/ui/layout/tree-item.vue b/src/ui/layout/tree-item.vue index f754d3a668..ea5fd2c2ba 100644 --- a/src/ui/layout/tree-item.vue +++ b/src/ui/layout/tree-item.vue @@ -148,8 +148,7 @@ export default { } event.stopPropagation(); - - this.$refs.objectLabel.$el.click(); + this.$refs.objectLabel.navigateOrPreview(event); }, handleContextMenu(event) { event.stopPropagation();