git clone <repository-url>
this repositorycd power-select-in-modal-focus-bug
yarn install
ember serve
- Visit your app at http://localhost:4200.
- Visit your tests at http://localhost:4200/tests.
What are possible reasons that an input-field doesn't get the focus via .focus()
? Having this problem right now with a power-select which is placed in a modal (both wormholed) where the search-input doesn't get focused when you open the select-options. Already tried to add a delay with later()
, tried to unfocus the previous focused element first with document.activeElement.blur()
- but the focus stays on the power-select-trigger... The strange thing is that if you click on the search-input once, the focus works (also if you close the power-select + reopen it)
- open power-select
- -> no focus on search-input
- click on search-input
- -> focus on search-input
- close power-select
- open power-select
- -> focus still works
- close power-select + modal
- open modal + power-select
- -> no focus on search-input