Skip to content

Commit

Permalink
Prevent CMX+X only when block selected by editor (codex-team#596)
Browse files Browse the repository at this point in the history
  • Loading branch information
khaydarov authored Jan 17, 2019
1 parent fc3e146 commit 67d5571
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions dist/codex-editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codex.editor",
"version": "2.7.28",
"version": "2.7.29",
"description": "CodeX Editor. Native JS, based on API and Open Source",
"main": "dist/codex-editor.js",
"types": "./types/index.d.ts",
Expand Down
12 changes: 6 additions & 6 deletions src/components/modules/blockEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,14 @@ export default class BlockEvents extends Module {
return;
}

/**
* Prevent default copy
* Remove "decline sound" on macOS
*/
event.preventDefault();

/** Copy Blocks before removing */
if (currentBlock.selected || BlockManager.currentBlock.isEmpty) {
/**
* Prevent default copy
* Remove "decline sound" on macOS
*/
event.preventDefault();

BlockSelection.copySelectedBlocks();

if (BlockSelection.allBlocksSelected) {
Expand Down

0 comments on commit 67d5571

Please sign in to comment.