Dont replace edited comment if text selected. Fixes #125

This commit is contained in:
Dessalines 2021-01-23 18:48:20 -05:00
parent 8c3c27002b
commit bf52dec0a1
1 changed files with 6 additions and 1 deletions

View File

@ -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);