diff options
author | Joram Wilander <jwawilander@gmail.com> | 2015-12-28 08:55:49 -0500 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2015-12-28 08:55:49 -0500 |
commit | f9f6b0cea3e16038aacb454486a7f9fec037127a (patch) | |
tree | 1f1dbe1c7c7f731917d8ae3b7bc9d210c4d8cad7 /web/react/components | |
parent | 80814b8866c23ce203ccbf716c4f4349c497b1eb (diff) | |
parent | e92d1faf4ef59ba96eb6ddb1c882bdbb93afed3f (diff) | |
download | chat-f9f6b0cea3e16038aacb454486a7f9fec037127a.tar.gz chat-f9f6b0cea3e16038aacb454486a7f9fec037127a.tar.bz2 chat-f9f6b0cea3e16038aacb454486a7f9fec037127a.zip |
Merge pull request #1757 from hmhealey/plt1482
PLT-1482 Changed how the sidebar opens the more channels modal
Diffstat (limited to 'web/react/components')
-rw-r--r-- | web/react/components/sidebar.jsx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx index cc2279b57..18c360cb8 100644 --- a/web/react/components/sidebar.jsx +++ b/web/react/components/sidebar.jsx @@ -39,6 +39,7 @@ export default class Sidebar extends React.Component { this.handleLeaveDirectChannel = this.handleLeaveDirectChannel.bind(this); this.handleResize = this.handleResize.bind(this); + this.showMoreChannelsModal = this.showMoreChannelsModal.bind(this); this.showNewChannelModal = this.showNewChannelModal.bind(this); this.hideNewChannelModal = this.hideNewChannelModal.bind(this); this.showMoreDirectChannelsModal = this.showMoreDirectChannelsModal.bind(this); @@ -250,6 +251,11 @@ export default class Sidebar extends React.Component { return a.display_name.localeCompare(b.display_name); } + 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'); + } + showNewChannelModal(type) { this.setState({newChannelModalType: type}); } @@ -594,10 +600,8 @@ export default class Sidebar extends React.Component { <li> <a href='#' - data-toggle='modal' className='nav-more' - data-target='#more_channels' - data-channeltype='O' + onClick={this.showMoreChannelsModal} > {'More...'} </a> |