fix: Comment reply/edit box resets if it gets out of view

This commit is contained in:
Vyrtsev Mikhail
2019-08-04 18:11:32 +03:00
parent 437c805e96
commit a51b00760a
+2 -2
View File
@@ -542,10 +542,10 @@ export class Comment extends Component<Props, State> {
);
}
if (this.props.inView === false) {
if (!props.editMode && this.props.inView === false) {
const [width, height] = this.base ? [this.base.scrollWidth, this.base.scrollHeight] : [100, 100];
return (
<div
<article
id={props.disabled ? undefined : `${COMMENT_NODE_CLASSNAME_PREFIX}${o.id}`}
style={{
width: `${width}px`,