问题描述
我们正在使用draftJS使用用户提及( draft-js-mention-plugin )和hashtag( draft-js-hashtag-plugin )功能创建富文本帖子/评论。以下是代码示例。
<FieldContainer
containerStyles={this.props.containerStyles}
editorStyles={this.props.editorStyles}
placeholderStyles={this.props.placeholderStyles}
height={this.props.height}
onClick={this.focus}
>
<Editor
editorState={this.props.editorState}
onChange={this.onChange}
plugins={this.plugins}
placeholder={this.props.placeholder}
ref={element => { this.editor = element;} }
onfocus={this.props.handleFocus}
onBlur={this.props.handleBlur}
handleKeyCommand={this.handleKeyCommand}
keyBindingFn={e => myKeyBindingFn(e,this.props.allowNewLine)}
readOnly={this.props.readOnly}
autoCapitalize={'none'}
autoComplete={'off'}
autoCorrect={'off'}
spellCheck={false}
/>
</PostFieldContainer>
这在桌面Web浏览器中运行良好。现在,我们也在尝试支持移动平台。我们在android chrome中面临以下两个问题:
-
Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node
at removeChild (https://192.168.1.9:3000/static/js/1.chunk.js:253583:22) at unmountHostComponents (https://192.168.1.9:3000/static/js/1.chunk.js:264847:13) at commitDeletion (https://192.168.1.9:3000/static/js/1.chunk.js:264915:9) at commitMutationEffects (https://192.168.1.9:3000/static/js/1.chunk.js:267143:15) .....
上述错误发生在您的React组件之一中:
in div (created by DraftEditorBlock) in DraftEditorBlock (created by DraftEditorContents) in div (created by DraftEditorContents) in div (created by DraftEditorContents) in DraftEditorContents (created by DraftEditor) in div (created by DraftEditor) in div (created by DraftEditor) in div (created by DraftEditor) in DraftEditor (created by PluginEditor) in PluginEditor (at PostField/index.js:363) ....
任何帮助或指导表示赞赏。 使用android chrome和google键盘对其进行了测试。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)