From 96688e10b22a778c76e03009da4b9f3d05eba5f7 Mon Sep 17 00:00:00 2001 From: Ben Alpert Date: Fri, 11 Aug 2017 14:35:55 -0700 Subject: [PATCH] Cautious range removal on blur without feature flag Summary: Fixes https://github.com/facebook/draft-js/issues/1188. Closes https://github.com/facebook/draft-js/pull/1190. Reviewed By: flarnie Differential Revision: D5614905 fbshipit-source-id: 5d18d96e279b360cfa47b9156fc85e93424d33b5 --- src/component/handlers/edit/editOnBlur.js | 2 -- src/component/utils/DraftFeatureFlags-core.js | 1 - 2 files changed, 3 deletions(-) diff --git a/src/component/handlers/edit/editOnBlur.js b/src/component/handlers/edit/editOnBlur.js index 75d1b1a0b9..616a41ddc4 100644 --- a/src/component/handlers/edit/editOnBlur.js +++ b/src/component/handlers/edit/editOnBlur.js @@ -14,7 +14,6 @@ import type DraftEditor from 'DraftEditor.react'; -const DraftFeatureFlags = require('DraftFeatureFlags'); const EditorState = require('EditorState'); const containsNode = require('containsNode'); @@ -33,7 +32,6 @@ function editOnBlur(editor: DraftEditor, e: SyntheticEvent): void { const selection = global.getSelection(); const editorNode = editor.refs.editor; if ( - !DraftFeatureFlags.draft_cautious_range_removal_on_blur || selection.rangeCount === 1 && containsNode(editorNode, selection.anchorNode) && containsNode(editorNode, selection.focusNode) diff --git a/src/component/utils/DraftFeatureFlags-core.js b/src/component/utils/DraftFeatureFlags-core.js index 194ced084c..ba0b6f1391 100644 --- a/src/component/utils/DraftFeatureFlags-core.js +++ b/src/component/utils/DraftFeatureFlags-core.js @@ -14,7 +14,6 @@ var DraftFeatureFlags = { draft_accept_selection_after_refocus: false, - draft_cautious_range_removal_on_blur: false, draft_killswitch_allow_nontextnodes: false, draft_segmented_entities_behavior: false, };