Skip to content

Commit

Permalink
fix: allow copy and paste in color input box
Browse files Browse the repository at this point in the history
  • Loading branch information
icelam committed Sep 2, 2020
1 parent 5876cd9 commit 8186b75
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/menus/applicationMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ import { IS_DEVELOPEMENT } from '@constants';

import {
appMenuItem,
editMenuItem,
developerMenuItem
} from './menuItems';

/**
* Menu template for creating application menu displayed in macOS
*/
const applicationMenuTemplate: MenuItemConstructorOptions[] = [
appMenuItem
appMenuItem,
editMenuItem
// Temporary disable `copyFormatMenuItem` and `themeMenuItem`
// Since importing `applicationMenu` and `settingMenu` at `setAppTheme()`
// breaks functions of other menu items
Expand Down
15 changes: 15 additions & 0 deletions src/menus/menuItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ import {
setCopyFormat
} from '@utils';

/**
* Menu item for editing text fields
*/
export const editMenuItem: MenuItemConstructorOptions = {
label: translations.menus.edit,
submenu: [
{ role: 'undo' },
{ role: 'redo' },
{ role: 'cut' },
{ role: 'copy' },
{ role: 'paste' },
{ role: 'selectAll' }
]
};

/**
* Menu item for setting copy format
*/
Expand Down
1 change: 1 addition & 0 deletions src/translations/menus.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const menusTranslations = {
edit: 'Edit',
copyFormat: 'Copy format',
copyAsHex: 'Copy as HEX',
copyAsRgb: 'Copy as RGB',
Expand Down

0 comments on commit 8186b75

Please sign in to comment.