From d299857ebb20b68c989543b6f44372b16fe8b950 Mon Sep 17 00:00:00 2001 From: Matthew Mulholland Date: Sun, 3 Jun 2018 13:24:06 +1000 Subject: [PATCH] #618: ensure focus available on preview pane. --- src/renderer/partials/ProvenanceProperties.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/renderer/partials/ProvenanceProperties.vue b/src/renderer/partials/ProvenanceProperties.vue index c001076c8..c742b5bd2 100644 --- a/src/renderer/partials/ProvenanceProperties.vue +++ b/src/renderer/partials/ProvenanceProperties.vue @@ -98,7 +98,13 @@ export default { }, focusErrors: function() { - document.querySelector('#provenance-errors-container').focus() + let element = document.querySelector('#provenance-errors-container') + if (!element) { + element = document.querySelector('#provenance-preview') + } + if (element) { + element.focus() + } } }, watch: {