mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-09 16:36:31 +00:00
Merge pull request #113 from chiragjn/master
Fix issue #112 for displaying Keyboard shortcuts
This commit is contained in:
@@ -45,10 +45,14 @@ ipcRenderer.on('log-out', () => {
|
|||||||
|
|
||||||
ipcRenderer.on('shortcut', () => {
|
ipcRenderer.on('shortcut', () => {
|
||||||
// create the menu for the below
|
// create the menu for the below
|
||||||
document.querySelector('.dropdown-toggle').click();
|
const node = document.querySelector('a[data-overlay-trigger=keyboard-shortcuts]');
|
||||||
|
// additional check
|
||||||
const nodes = document.querySelectorAll('.dropdown-menu li:nth-child(4) a');
|
if (node.text.trim().toLowerCase() === 'keyboard shortcuts') {
|
||||||
nodes[nodes.length - 1].click();
|
node.click();
|
||||||
|
} else {
|
||||||
|
// atleast click the dropdown
|
||||||
|
document.querySelector('.dropdown-toggle').click();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// To prevent failing this script on linux we need to load it after the document loaded
|
// To prevent failing this script on linux we need to load it after the document loaded
|
||||||
|
|||||||
Reference in New Issue
Block a user