[MM-34461] Restore Find menu item (#1526)

This commit is contained in:
Devin Binnie
2021-04-06 05:06:15 -04:00
committed by GitHub
parent a0ebc19c54
commit 8d383b3de2
2 changed files with 13 additions and 0 deletions

View File

@@ -100,6 +100,12 @@ function createTemplate(config) {
});
const viewSubMenu = [{
label: 'Find..',
accelerator: 'CmdOrCtrl+F',
click() {
WindowManager.sendToFind();
},
}, {
label: 'Reload',
accelerator: 'CmdOrCtrl+R',
click() {

View File

@@ -381,6 +381,13 @@ export function reload() {
}
}
export function sendToFind() {
const currentView = status.viewManager.getCurrentView();
if (currentView) {
currentView.view.webContents.sendInputEvent({type: 'keyDown', keyCode: 'F', modifiers: ['CmdOrCtrl', 'Shift']});
}
}
export function handleHistory(event, offset) {
if (status.viewManager) {
const activeView = status.viewManager.getCurrentView();