mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-26 21:01:28 +00:00
Fix url link selection placement. Fixes #155
This commit is contained in:
parent
27fd4a4626
commit
7d8f1a1ced
1 changed files with 2 additions and 2 deletions
|
@ -422,11 +422,11 @@ export class MarkdownTextArea extends Component<
|
|||
start
|
||||
)}[${selectedText}]()${i.state.content.substring(end)}`;
|
||||
textarea.focus();
|
||||
setTimeout(() => (textarea.selectionEnd = end + 5), 10);
|
||||
setTimeout(() => (textarea.selectionEnd = end + 3), 10);
|
||||
} else {
|
||||
i.state.content += '[]()';
|
||||
textarea.focus();
|
||||
setTimeout(() => (textarea.selectionEnd -= 0), 10);
|
||||
setTimeout(() => (textarea.selectionEnd -= 1), 10);
|
||||
}
|
||||
i.setState(i.state);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue