Changed search box to not autoselect all text on click

Этот коммит содержится в:
hmhealey
2015-11-02 11:51:16 -05:00
родитель e5a5934ab4
Коммит 57220828a9

Просмотреть файл

@@ -90,14 +90,10 @@ export default class SearchBar extends React.Component {
this.refs.autocomplete.handleInputChange(e.target, term); this.refs.autocomplete.handleInputChange(e.target, term);
} }
handleMouseInput(e) {
e.preventDefault();
}
handleUserBlur() { handleUserBlur() {
this.setState({focused: false}); this.setState({focused: false});
} }
handleUserFocus(e) { handleUserFocus() {
e.target.select();
$('.search-bar__container').addClass('focused'); $('.search-bar__container').addClass('focused');
this.setState({focused: true}); this.setState({focused: true});
@@ -198,7 +194,6 @@ export default class SearchBar extends React.Component {
onBlur={this.handleUserBlur} onBlur={this.handleUserBlur}
onChange={this.handleUserInput} onChange={this.handleUserInput}
onKeyDown={this.handleKeyDown} onKeyDown={this.handleKeyDown}
onMouseUp={this.handleMouseInput}
/> />
{isSearching} {isSearching}
<SearchAutocomplete <SearchAutocomplete