Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit 0f6199d

Browse files
flarniefacebook-github-bot
authored andcommitted
1/n Move 'blockSelect' flag out of cWU
Summary: We have been slowly rolling out this change, and no significant new bugs have coincided with the roll-out. Let's remove the flag, so 100% of folks get this change. :) Reviewed By: bvaughn Differential Revision: D7415022 fbshipit-source-id: 831905c8caec5f34c54134d761644accbff03951
1 parent 1d77500 commit 0f6199d

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

src/component/base/DraftEditor.react.js

+12-17
Original file line numberDiff line numberDiff line change
@@ -116,20 +116,18 @@ class UpdateDraftEditorFlags extends React.Component<{
116116
*/
117117
editor._latestEditorState = this.props.editorState;
118118
}
119-
if (gkx('draft_js_stop_blocking_select_events')) {
120-
/**
121-
* The reason we set this 'blockSelectEvents' flag is that IE will fire a
122-
* 'selectionChange' event when we programmatically change the selection,
123-
* meaning it would trigger a new select event while we are in the middle
124-
* of updating.
125-
* We found that the 'selection.addRange' was what triggered the stray
126-
* selectionchange event in IE.
127-
* To be clear - we have not been able to reproduce specific bugs related
128-
* to this stray selection event, but have recorded logs that some
129-
* conditions do cause it to get bumped into during editOnSelect.
130-
*/
131-
editor._blockSelectEvents = true;
132-
}
119+
/**
120+
* The reason we set this 'blockSelectEvents' flag is that IE will fire a
121+
* 'selectionChange' event when we programmatically change the selection,
122+
* meaning it would trigger a new select event while we are in the middle
123+
* of updating.
124+
* We found that the 'selection.addRange' was what triggered the stray
125+
* selectionchange event in IE.
126+
* To be clear - we have not been able to reproduce specific bugs related
127+
* to this stray selection event, but have recorded logs that some
128+
* conditions do cause it to get bumped into during editOnSelect.
129+
*/
130+
editor._blockSelectEvents = true;
133131
}
134132
}
135133

@@ -454,9 +452,6 @@ class DraftEditor extends React.Component<DraftEditorProps, State> {
454452
* of browser interaction, not re-renders and forced selections.
455453
*/
456454
componentWillUpdate(nextProps: DraftEditorProps): void {
457-
if (!gkx('draft_js_stop_blocking_select_events')) {
458-
this._blockSelectEvents = true;
459-
}
460455
if (!gkx('draft_js_remove_componentwillupdate')) {
461456
// we are using the GK to phase out setting this here
462457
this._latestEditorState = nextProps.editorState;

0 commit comments

Comments
 (0)