mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-10 02:15:11 +00:00
Fix url link selection placement. Fixes #155
This commit is contained in:
parent
27fd4a4626
commit
7d8f1a1ced
|
@ -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