PLT-5190 fixing javasscript error on RHS (#5068)
* PLT-5190 fixing javasscript error on RHS * PLT-5190 fixing javasscript error on RHS
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
a5674b481d
Коммит
59d2d34279
@@ -2,7 +2,6 @@
|
|||||||
// See License.txt for license information.
|
// See License.txt for license information.
|
||||||
|
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import ReactDOM from 'react-dom';
|
|
||||||
import Client from 'client/web_client.jsx';
|
import Client from 'client/web_client.jsx';
|
||||||
import * as AsyncClient from 'utils/async_client.jsx';
|
import * as AsyncClient from 'utils/async_client.jsx';
|
||||||
import * as GlobalActions from 'actions/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
@@ -124,8 +123,8 @@ export default class SearchBar extends React.Component {
|
|||||||
isMentionSearch,
|
isMentionSearch,
|
||||||
(data) => {
|
(data) => {
|
||||||
this.setState({isSearching: false});
|
this.setState({isSearching: false});
|
||||||
if (Utils.isMobile()) {
|
if (Utils.isMobile() && this.search) {
|
||||||
ReactDOM.findDOMNode(this.refs.search).value = '';
|
this.search.value = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
AppDispatcher.handleServerAction({
|
AppDispatcher.handleServerAction({
|
||||||
@@ -147,7 +146,7 @@ export default class SearchBar extends React.Component {
|
|||||||
handleSubmit(e) {
|
handleSubmit(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.performSearch(this.state.searchTerm.trim());
|
this.performSearch(this.state.searchTerm.trim());
|
||||||
$(ReactDOM.findDOMNode(this.refs.search)).find('input').blur();
|
$(this.search).find('input').blur();
|
||||||
this.clearFocus();
|
this.clearFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -276,7 +275,9 @@ export default class SearchBar extends React.Component {
|
|||||||
>
|
>
|
||||||
<span className='fa fa-search sidebar__search-icon'/>
|
<span className='fa fa-search sidebar__search-icon'/>
|
||||||
<SuggestionBox
|
<SuggestionBox
|
||||||
ref='search'
|
ref={(search) => {
|
||||||
|
this.search = search;
|
||||||
|
}}
|
||||||
className='form-control search-bar'
|
className='form-control search-bar'
|
||||||
placeholder={Utils.localizeMessage('search_bar.search', 'Search')}
|
placeholder={Utils.localizeMessage('search_bar.search', 'Search')}
|
||||||
value={this.state.searchTerm}
|
value={this.state.searchTerm}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user