UX: Select search term when focus returns to search box.
This commit is contained in:
parent
b4974f5876
commit
2ae0ef0ad9
|
@ -134,7 +134,7 @@ export default Ember.Component.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
showedSearch() {
|
showedSearch() {
|
||||||
$('#search-term').focus();
|
$('#search-term').focus().select();
|
||||||
},
|
},
|
||||||
|
|
||||||
showSearchHelp() {
|
showSearchHelp() {
|
||||||
|
|
|
@ -5,5 +5,9 @@ export default TextField.extend({
|
||||||
@computed('searchService.searchContextEnabled')
|
@computed('searchService.searchContextEnabled')
|
||||||
placeholder: function(searchContextEnabled) {
|
placeholder: function(searchContextEnabled) {
|
||||||
return searchContextEnabled ? "" : I18n.t('search.title');
|
return searchContextEnabled ? "" : I18n.t('search.title');
|
||||||
|
},
|
||||||
|
|
||||||
|
focusIn: function() {
|
||||||
|
Em.run.later(() => { this.$().select(); });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="search row clearfix">
|
<div class="search row clearfix">
|
||||||
{{input type="text" value=searchTerm class="input-xxlarge search no-blur" action="search"}}
|
{{search-text-field value=searchTerm class="input-xxlarge search no-blur" action="search"}}
|
||||||
{{d-button action="search" icon="search" class="btn-primary" disabled=isNotValidSearchTerm}}
|
{{d-button action="search" icon="search" class="btn-primary" disabled=isNotValidSearchTerm}}
|
||||||
{{#if canBulkSelect}}
|
{{#if canBulkSelect}}
|
||||||
{{#if model.posts}}
|
{{#if model.posts}}
|
||||||
|
|
Loading…
Reference in New Issue