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: {