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

fix contentEditable warning #98

Closed
wants to merge 1 commit into from

Conversation

linkkingjay
Copy link

See #53. The issue has been fixed in the React repo: facebook/react#6112 .

@@ -262,6 +262,7 @@ class DraftEditor
ref="editor"
role={readOnly ? null : (this.props.role || 'textbox')}
spellCheck={allowSpellCheck && this.props.spellCheck}
suppressContentEditableWarning={!readOnly}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't this always just be true?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hellendag Of course it can. Fixed.

@adcoolguy
Copy link

We have the same warning even after using this new attribute. Are we missing something?

                            <div className="control-group">
                                <label htmlFor="desc" className="col-sm-2 control-label">Description:</label>
                                <div className="col-sm-10">
                                    <Editor ref="desc" suppressContentEditableWarning editorState={editorState} onChange={this.onChange} />
                                </div>
                            </div>

We use React 14.0. Thanks!

@tasti
Copy link
Contributor

tasti commented Feb 28, 2016

@adcoolguy: The suppressContentEditableWarning prop will be added into React 15.0 (as mentioned facebook/react#5837).

Also, you won't have to place the prop on your Editor component; this PR is placing it internally for you.

@sophiebits
Copy link
Contributor

I actually ended up getting this as part of #179. Thanks for sending this in though!

@sophiebits sophiebits closed this Mar 9, 2016
flarnie added a commit to flarnie/draft-js that referenced this pull request Sep 20, 2016
The issue with 'React ContentEditable Warning' was resolved when React
added the 'suppressContentEditableWarning' option[1] and then we used it
in Draft.js[2]. This doesn't need to be in the docs any more.

[1]: facebook/react#6112
[2]: facebookarchive#98
ouchxp pushed a commit to ouchxp/draft-js that referenced this pull request Apr 7, 2017
The issue with 'React ContentEditable Warning' was resolved when React
added the 'suppressContentEditableWarning' option[1] and then we used it
in Draft.js[2]. This doesn't need to be in the docs any more.

[1]: facebook/react#6112
[2]: facebookarchive#98
midas19910709 added a commit to midas19910709/draft-js that referenced this pull request Mar 30, 2022
The issue with 'React ContentEditable Warning' was resolved when React
added the 'suppressContentEditableWarning' option[1] and then we used it
in Draft.js[2]. This doesn't need to be in the docs any more.

[1]: facebook/react#6112
[2]: facebookarchive/draft-js#98
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants