UX: Select text in input when toggling search menu.
This commit is contained in:
parent
d1bb71f99d
commit
e619af3eee
|
@ -215,7 +215,10 @@ export default createWidget('header', {
|
|||
|
||||
this.state.searchVisible = !this.state.searchVisible;
|
||||
this.updateHighlight();
|
||||
Ember.run.next(() => $('#search-term').focus());
|
||||
|
||||
if (this.state.searchVisible) {
|
||||
Ember.run.schedule('afterRender', () => $('#search-term').focus().select());
|
||||
}
|
||||
},
|
||||
|
||||
toggleUserMenu() {
|
||||
|
|
Loading…
Reference in New Issue