Stopped automatically focusing user list search box on mobile (#3992)

This commit is contained in:
Harrison Healey
2016-09-08 09:49:12 -03:00
committed by enahum
parent faf944f47a
commit 04ee6a6afb
+5 -1
View File
@@ -3,6 +3,7 @@
import $ from 'jquery';
import ReactDOM from 'react-dom';
import * as UserAgent from 'utils/user_agent.jsx';
import UserList from './user_list.jsx';
import {intlShape, injectIntl, defineMessages, FormattedMessage} from 'react-intl';
@@ -60,7 +61,10 @@ class FilteredUserList extends React.Component {
}
componentDidMount() {
ReactDOM.findDOMNode(this.refs.filter).focus();
// only focus the search box on desktop so that we don't cause the keyboard to open on mobile
if (!UserAgent.isMobileApp()) {
ReactDOM.findDOMNode(this.refs.filter).focus();
}
}
componentDidUpdate(prevProps, prevState) {