https://ember-twiddle.com/f5b03da876189e65370402daca33e56c?openFiles=controllers.application.js%2C
Steps to replicate:
Confirmed, I'm seeing this behavior too. The issue seems to be that the input once generated doesn't properly re-focus when it is hidden and then shown again ...
I am not sure this is an Ember bug. autofocus behaviour is not that simple to grasp, but this thing happens in the following contexts too:
<input autofocus> (twiddle)I am not sure this is a bug and, if it is, that is on our side.
I am closing the issues for the reasons above. Feel free to reopen if you still think this is an Ember issue.
Thank you!
Experienced the same problem here.
Couldn't find better solution than calling
this.$('input').focus()
inside didInsertElement() hook.
The "problem" is that autofocus is applied when on page load event, so it is only applied the first time the page is loaded.
I solved it like this without Jquery:
this.get('element').querySelector('.selector').focus()
You can put it, for example in the didInsertElement hook.
Most helpful comment
The "problem" is that autofocus is applied when on page load event, so it is only applied the first time the page is loaded.