From dc82145d00baeb3c87b607fe691322cac052b57e Mon Sep 17 00:00:00 2001 From: Jocs Date: Tue, 1 May 2018 21:25:43 +0800 Subject: [PATCH] optimization: remove debug code --- src/editor/contentState/index.js | 2 -- src/editor/contentState/updateCtrl.js | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/editor/contentState/index.js b/src/editor/contentState/index.js index 02dbff7b..a40fd102 100644 --- a/src/editor/contentState/index.js +++ b/src/editor/contentState/index.js @@ -99,7 +99,6 @@ class ContentState { } render (isRenderCursor = true) { - console.log('render') const { blocks, cursor, searchMatches: { matches, index } } = this const activeBlocks = this.getActiveBlocks() matches.forEach((m, i) => { @@ -112,7 +111,6 @@ class ContentState { } partialRender (blocks) { - console.log('partialrender') const { cursor, searchMatches: { matches, index } } = this const activeBlocks = this.getActiveBlocks() matches.forEach((m, i) => { diff --git a/src/editor/contentState/updateCtrl.js b/src/editor/contentState/updateCtrl.js index cd757d25..f65ad64e 100644 --- a/src/editor/contentState/updateCtrl.js +++ b/src/editor/contentState/updateCtrl.js @@ -280,7 +280,7 @@ const updateCtrl = ContentState => { // bugfix: #67 problem 1 if (block && block.icon) return event.preventDefault() - if (isMetaKey(event) || event.key === EVENT_KEYS.Enter) { + if (isMetaKey(event)) { return }