diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ee26b2d..185ff60f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ Release date: TBD #### All Platforms - Suppress white screen which is displayed for a moment on startup - Support unread indications in team sidebar of Mattermost server 3.6 +- Remove confusing `Ctrl(CMD)+S` shortcut for searching within a team ### Bug Fixes diff --git a/src/browser/webview/mattermost.js b/src/browser/webview/mattermost.js index ccfe66e7..8eb0266c 100644 --- a/src/browser/webview/mattermost.js +++ b/src/browser/webview/mattermost.js @@ -146,30 +146,3 @@ notification.override({ ipc.sendToHost('onNotificationClick'); } }); - -// get the last of href for the current channel in the sidebar. -function getCurrentChannelString() { - const activeChannelLink = document.querySelector('.active a.sidebar-channel'); - const urlElements = activeChannelLink.href.split('/'); - return urlElements[urlElements.length - 1]; -} - -ipc.on('activate-search-box', () => { - const searchBoxes = document.getElementsByClassName('search-bar'); // should use id - if (searchBoxes.length === 0) { - return; - } - const searchBox = searchBoxes[0]; - searchBox.focus(); - searchBox.value = ''; //Clear the input box -}); - -ipc.on('activate-search-box-in-channel', () => { - const searchBoxes = document.getElementsByClassName('search-bar'); // should use id - if (searchBoxes.length === 0) { - return; - } - const searchBox = searchBoxes[0]; - searchBox.focus(); - searchBox.value = `in:${getCurrentChannelString()} `; -}); diff --git a/src/main/menus/app.js b/src/main/menus/app.js index 06ecf2fe..95fbc10b 100644 --- a/src/main/menus/app.js +++ b/src/main/menus/app.js @@ -69,14 +69,6 @@ function createTemplate(mainWindow, config) { role: 'paste' }, { role: 'selectall' - }, separatorItem, { - label: 'Search in Team', - accelerator: 'CmdOrCtrl+S', - click: (item, focusedWindow) => { - if (focusedWindow) { - focusedWindow.webContents.send('activate-search-box'); - } - } }] }); template.push({