Dont replace edited comment if text selected. Fixes #125
This commit is contained in:
parent
8c3c27002b
commit
bf52dec0a1
1 changed files with 6 additions and 1 deletions
|
@ -536,7 +536,12 @@ export class MarkdownTextArea extends Component<
|
|||
.split('\n')
|
||||
.map(t => `> ${t}`)
|
||||
.join('\n') + '\n\n';
|
||||
this.state.content = quotedText;
|
||||
if (this.state.content == null) {
|
||||
this.state.content = '';
|
||||
} else {
|
||||
this.state.content += '\n';
|
||||
}
|
||||
this.state.content += quotedText;
|
||||
this.setState(this.state);
|
||||
// Not sure why this needs a delay
|
||||
setTimeout(() => autosize.update(textarea), 10);
|
||||
|
|
Loading…
Reference in a new issue