diff --git a/app/assets/javascripts/discourse/app/controllers/composer.js b/app/assets/javascripts/discourse/app/controllers/composer.js index 4890db311eb..f76b948f8cb 100644 --- a/app/assets/javascripts/discourse/app/controllers/composer.js +++ b/app/assets/javascripts/discourse/app/controllers/composer.js @@ -1175,7 +1175,7 @@ export default Controller.extend({ const elem = document.querySelector("html"); elem.classList.remove("fullscreen-composer"); - document.activeElement.blur(); + document.activeElement && document.activeElement.blur(); this.setProperties({ model: null, lastValidatedAt: null }); },