Quote is not inserted where my cursor is
-
Filed under: [Fucking hell why doesn't it insert the quote where my text insertion cursor is?](#tag)
Quote is not inserted where my cursor is, instead its appended to the end of my work-in-progress post.
-
This is slightly hard to resolve without breaking things.
If your cursor is in the middle of a code block or some other tag, the behavior can be very broken.
What if the cursor is he[]re?
Or
``` a+=1; call_pro[]fit ```
-
a+=1;
call_pro@sam said:This is slightly hard to resolve without breaking things.
fitcall_pro@sam <a href="/t/via-quote/549/2">said</a>:<blockquote>This is slightly hard to resolve without breaking things.</blockquote>fit
Yes, it breaks. Duh. Why would you even want to put a quote inside a code block or some other tag? It's not like it's gonna fix quote formating or anything.
It's like disabling pasting, because what if the cursor is inside your terminal and you just pasted
rm -rf /
? Well duh, you should have put the cursor in the place where you wanted your pasted text to appear.Now apply the same logic to quotes.
-
It's like disabling pasting, because what if the cursor is inside your terminal and you just pasted rm -rf /
That is a good point, personally I could be swayed either to add a site setting or change the default behavior here, just explaining the reasoning behind it. I think it is fairly correct though to fast forward to the end of the current sentence, before inserting a quote.
-
I think it is fairly correct though to fast forward to the end of the current sentence, before inserting a quote.
Now that makes even less sense. I've either put my cursor where I want the quote to appear (and want it to appear exactly there), or not (and it's still gonna break my post).
Oh, and you'd need to define "sentence", which is no easy task in general.
Come on. We're no kids. We don't need plastic knives and safety locks. You really don't need to stop us from breaking our own posts with incorrectly applied formatting. Garbage in, garbage out - if I type in a broken post, it's gonna end up broken, and I'm fine with that.
-
if I type in a broken post, it's gonna end up broken, and I'm fine with that.
I would also point out that some people on TDWTF are rather fond of posting broken HTML on purpose, because sometimes it makes browsers do things that are interesting, entertaining and/or annoying.
-
Feature request: Add and disclose some XSS exploits to make the forum more amusing.
-
Personally I think it is fine to insert the quote at the current cursor position.
-
As a counterpoint, I think the current behaviour is fine. For the times when I want to do something elaborate, I can always patch it up by hand in the editor afterwards, but those are a minority of cases. (If you do change it, can we have the user option to have the insert-at-end behaviour as well? And it's definitely a FRQ and not a Bug.)
-
Eh, I think I'd prefer a hybrid - after the end of the current line.
E.g
Look at this awful| thing that Morbs said: Anyway, that's my opinion.
into
Look at this awful thing that Morbs said: [quote ....] .... [/quote]| Anyway, that's my opinion.
-
I could be swayed either to add a site setting or change the default behavior here, just explaining the reasoning behind it
You can't protect your users from everything.
-
You can't protect your users from everything.
I agree, also I think consistency is important. At the moment the toolbar buttons all insert shit at the cursor. Images, links, uploads. Its weird having an inconsistent behavior for quoting.
-
As a counterpoint, I think the current behaviour is fine. If I want to do something elaborate, I can always patch it up by hand in the editor afterwards, but those are a minority of cases. (If you do change it, can we have the user option to have the insert-at-end behaviour as well? And it's definitely a FRQ and not a Bug.)
I do a lot of posting from devices with poor or non-existent clipboard support. For instance, I'm writing this on my XBox One, which doesn't seem to have a clipboard. So patching it up by hand is not an option for me.
-
@sam let's just change it so quote insertion is at the cursor. I don't think any behavior is perfect or right here, but consistency is welcome.
-
For the record, CS always put the quote at the end. I kept banging my head against that, but there you go.
-
CS always put the quote at the end.
CS inserts at the cursor for me.
Browser difference?
<- Firefox.
-
CS inserts at the cursor for me.Browser difference?
<- Firefox.Chrome
d. So always in the raw html editor, which may be the real difference.
-
OK, so we just deployed a version with quote insertion at the cursor, thanks @sam!
CS inserts at the cursor for me.
Let me try it out. Cursor is riiiight there ↑
Yep seems good.
-