mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 10:58:31 -05:00
UX: Select text in input when toggling search menu.
This commit is contained in:
parent
d1bb71f99d
commit
e619af3eee
1 changed files with 4 additions and 1 deletions
|
@ -215,7 +215,10 @@ export default createWidget('header', {
|
||||||
|
|
||||||
this.state.searchVisible = !this.state.searchVisible;
|
this.state.searchVisible = !this.state.searchVisible;
|
||||||
this.updateHighlight();
|
this.updateHighlight();
|
||||||
Ember.run.next(() => $('#search-term').focus());
|
|
||||||
|
if (this.state.searchVisible) {
|
||||||
|
Ember.run.schedule('afterRender', () => $('#search-term').focus().select());
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleUserMenu() {
|
toggleUserMenu() {
|
||||||
|
|
Loading…
Reference in a new issue