diff --git a/webapp/components/Editor/ContextMenu.vue b/webapp/components/Editor/ContextMenu.vue index 25e50e1e5..e2e546a27 100644 --- a/webapp/components/Editor/ContextMenu.vue +++ b/webapp/components/Editor/ContextMenu.vue @@ -28,7 +28,11 @@ export default { theme: 'dark', trigger, onMount(instance) { - instance.popper.querySelector('input').focus({ preventScroll: true }) + const input = instance.popper.querySelector('input') + + if (input) { + input.focus({ preventScroll: true }) + } }, })