diff --git a/app/assets/javascripts/discourse/components/search-text-field.js.es6 b/app/assets/javascripts/discourse/components/search-text-field.js.es6 index 88ae59a9749..a086a51f32a 100644 --- a/app/assets/javascripts/discourse/components/search-text-field.js.es6 +++ b/app/assets/javascripts/discourse/components/search-text-field.js.es6 @@ -10,6 +10,10 @@ export default TextField.extend({ @on("didInsertElement") becomeFocused() { - if (this.get('hasAutofocus')) this.$().focus(); + if (!this.get('hasAutofocus')) { return; } + // iOS is crazy, without this we will not be + // at the top of the page + $(window).scrollTop(0); + this.$().focus(); } });