mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-25 15:39:25 +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')
|
.split('\n')
|
||||||
.map(t => `> ${t}`)
|
.map(t => `> ${t}`)
|
||||||
.join('\n') + '\n\n';
|
.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);
|
this.setState(this.state);
|
||||||
// Not sure why this needs a delay
|
// Not sure why this needs a delay
|
||||||
setTimeout(() => autosize.update(textarea), 10);
|
setTimeout(() => autosize.update(textarea), 10);
|
||||||
|
|
Loading…
Reference in a new issue