diff --git a/app/assets/javascripts/discourse/views/modal_body_view.js b/app/assets/javascripts/discourse/views/modal_body_view.js index f161045cbe3..10eec8f6cd4 100644 --- a/app/assets/javascripts/discourse/views/modal_body_view.js +++ b/app/assets/javascripts/discourse/views/modal_body_view.js @@ -7,6 +7,7 @@ @module Discourse **/ Discourse.ModalBodyView = Discourse.View.extend({ + focusInput: true, _setupModal: function() { var self = this, @@ -20,7 +21,7 @@ Discourse.ModalBodyView = Discourse.View.extend({ $('#modal-alert').hide(); // Focus on first element - if (!Discourse.Mobile.mobileView) { + if (!Discourse.Mobile.mobileView && self.get('focusInput')) { Em.run.schedule('afterRender', function() { self.$('input:first').focus(); }); diff --git a/app/assets/javascripts/discourse/views/search-help.js.es6 b/app/assets/javascripts/discourse/views/search-help.js.es6 index 4492fde70a9..888c48bb4d9 100644 --- a/app/assets/javascripts/discourse/views/search-help.js.es6 +++ b/app/assets/javascripts/discourse/views/search-help.js.es6 @@ -1,4 +1,5 @@ export default Discourse.ModalBodyView.extend({ templateName: 'modal/search_help', - title: I18n.t('search_help.title') + title: I18n.t('search_help.title'), + focusInput: false });