2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

fix search screen looks white

This commit is contained in:
Sam 2015-09-16 15:02:57 +10:00
parent 77895473e5
commit afdb15f99f

View file

@ -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();
}
});