[MM-34461] Restore Find menu item (#1526)
This commit is contained in:
@@ -100,6 +100,12 @@ function createTemplate(config) {
|
||||
});
|
||||
|
||||
const viewSubMenu = [{
|
||||
label: 'Find..',
|
||||
accelerator: 'CmdOrCtrl+F',
|
||||
click() {
|
||||
WindowManager.sendToFind();
|
||||
},
|
||||
}, {
|
||||
label: 'Reload',
|
||||
accelerator: 'CmdOrCtrl+R',
|
||||
click() {
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user