Permalink
Browse files

fix input does not support paste and copy

  • Loading branch information...
harlanc committed Jun 24, 2018
1 parent b9ffe45 commit d5b753425a66afc1997194465a0a92fafebfe51e
Showing with 22 additions and 1 deletion.
  1. +22 −1 src/components/preferences.js
@@ -18,7 +18,7 @@
*/

const electron = require('electron')
const { app, shell, BrowserWindow } = electron
const { app, shell, BrowserWindow, Menu } = electron

const ipc = electron.ipcMain

@@ -165,6 +165,27 @@ module.exports = class {
shell.openExternal(url)
})

var template = [{
label: 'Application',
submenu: [
{ label: 'About Application', selector: 'orderFrontStandardAboutPanel:' },
{ type: 'separator' },
{ label: 'Quit', accelerator: 'Command+Q', click: function () { app.quit() }}
]}, {
label: 'Edit',
submenu: [
{ label: 'Undo', accelerator: 'CmdOrCtrl+Z', selector: 'undo:' },
{ label: 'Redo', accelerator: 'Shift+CmdOrCtrl+Z', selector: 'redo:' },
{ type: 'separator' },
{ label: 'Cut', accelerator: 'CmdOrCtrl+X', selector: 'cut:' },
{ label: 'Copy', accelerator: 'CmdOrCtrl+C', selector: 'copy:' },
{ label: 'Paste', accelerator: 'CmdOrCtrl+V', selector: 'paste:' },
{ label: 'Select All', accelerator: 'CmdOrCtrl+A', selector: 'selectAll:' }
]}
]

Menu.setApplicationMenu(Menu.buildFromTemplate(template))

this.window.once('ready-to-show', () => {
this.window.show()
})

0 comments on commit d5b7534

Please sign in to comment.