diff --git a/src/renderer/components/snippets/SnippetView.vue b/src/renderer/components/snippets/SnippetView.vue index 99937b4..55fbf86 100644 --- a/src/renderer/components/snippets/SnippetView.vue +++ b/src/renderer/components/snippets/SnippetView.vue @@ -172,11 +172,13 @@ export default { }, watch: { - isNew () { - this.$nextTick(() => { - this.$refs.input.$refs.input.focus() - this.$refs.input.$refs.input.select() - }) + isNew (v) { + if (v) { + this.$nextTick(() => { + this.$refs.input.$refs.input.focus() + this.$refs.input.$refs.input.select() + }) + } } },