Fixed Reply to selected text always inserts quote at top of editor window, not at cursor position

Sim

Well-known member
Affected version
2.2
Replying to selected text doesn't insert the quote at the current cursor position - it always inserts the quote at the top of the editor window.

Steps to reproduce:

1. Select some text in a post and click Reply

1593009015080.webp

2. the quote is inserted into your reply. Now add some text below and put the cursor on a new line ready to receive another quote

1593009064715.webp

3. select some more text from a post and click reply again

1593009088461.webp

4. the editor inserts the second reply at the top (inside the existing reply) rather than at the current cursor position

1593009128796.webp


Note that this issue also occurs if you simply type some text before selecting text in a post and clicking reply to insert the quote - the quotes are always inserted at the top of the editor window, not at the current cursor position.
 
I should note that clicking Reply at the post level does do what you expect and inserts the quote at the current cursor position.

I've only found it an issue when replying to selected text.
 
This is one of those bugs where you spend ages trying to figure out what might've caused it (especially as we had custom code to help with this and there's been a big editor update as well) and then when you find it/realize you just go "oh, yeah of course". :)

Should be fixed now.
 
Top Bottom