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