summaryrefslogtreecommitdiffstats
path: root/webapp/components/sidebar.jsx
diff options
context:
space:
mode:
authorNick Frazier <nrflaw@gmail.com>2016-12-09 22:46:52 -0500
committerChristopher Speller <crspeller@gmail.com>2016-12-09 22:46:52 -0500
commitcb870c83d1f3135b2b339f3444cfa7c632c4d5bd (patch)
treedae26949955feca9a26e20f0d3e7890ab115b93c /webapp/components/sidebar.jsx
parentc2be6497ebc3dd586f4fbd61f76ac6cef23a9acf (diff)
downloadchat-cb870c83d1f3135b2b339f3444cfa7c632c4d5bd.tar.gz
chat-cb870c83d1f3135b2b339f3444cfa7c632c4d5bd.tar.bz2
chat-cb870c83d1f3135b2b339f3444cfa7c632c4d5bd.zip
PLT-4783 Fix autofocus for "Add/Manage Members" and "More public channels" modals (#4610)
* test fix * additional test fix * removed commented line * test fix additional test fix removed commented line fixed sidebar, rolled back web_client fix * fix for more_channels input focus bug
Diffstat (limited to 'webapp/components/sidebar.jsx')
-rw-r--r--webapp/components/sidebar.jsx6
1 files changed, 6 insertions, 0 deletions
diff --git a/webapp/components/sidebar.jsx b/webapp/components/sidebar.jsx
index 85d39c9e7..1145c8ab3 100644
--- a/webapp/components/sidebar.jsx
+++ b/webapp/components/sidebar.jsx
@@ -19,6 +19,7 @@ import * as AsyncClient from 'utils/async_client.jsx';
import * as Utils from 'utils/utils.jsx';
import * as ChannelUtils from 'utils/channel_utils.jsx';
import * as ChannelActions from 'actions/channel_actions.jsx';
+import * as UserAgent from 'utils/user_agent.jsx';
import Constants from 'utils/constants.jsx';
@@ -341,6 +342,11 @@ export default class Sidebar extends React.Component {
showMoreChannelsModal() {
// manually show the modal because using data-toggle messes with keyboard focus when the modal is dismissed
$('#more_channels').modal({'data-channeltype': 'O'}).modal('show');
+ $('#more_channels').on('shown.bs.modal', () => {
+ if (!UserAgent.isMobile()) {
+ $('#more_channels input').focus();
+ }
+ });
}
showNewChannelModal(type) {