mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-21 22:27:11 +00:00
Dont replace edited comment if text selected. Fixes #125
This commit is contained in:
parent
8c3c27002b
commit
bf52dec0a1
|
@ -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