From afdb15f99f005b164917d18bc13dfdbb0ea2c8a2 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 16 Sep 2015 15:02:57 +1000 Subject: [PATCH] fix search screen looks white --- .../discourse/components/search-text-field.js.es6 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(); } });