Partial fix A couple quirks in highlight and quote

beerForo

Well-known member
Affected version
2.2
Quirk 1.

A user posted some text and a code block. I highlighted both and the Quote/Reply buttons appeared but you could not click them. I highlighted because this was a very long post and I only wanted to talk about the code block and text above it. The reason I call this a quirk is, if you click Reply on the actual post, it does quote the text and code blocks. So you have to edit away the rest. Highlight should do this for you.

Quirk 2.

If I highlight a passage that is all bold, and choose Reply, it quotes un-bolded. If I highlight a passage that has regular text and bold, those bold parts are correctly bold.

I can provide examples if needed.
 
Fair enough:

Here's #2


Try to highlight and reply to:

"I will be starting on the list Dec 1, 2020.

This request thread will run for the next 7 days from the date of this thread start date. After the 7th day has passed, I'm going to either ignore future votes/requests or ask a moderator to close this thread."
 
"I will be starting on the list Dec 1, 2020.

This request thread will run for the next 7 days from the date of this thread start date. After the 7th day has passed, I'm going to either ignore future votes/requests or ask a moderator to close this thread."

Or you can just do it here :D
 
"I will be starting on the list Dec 1, 2020.

This request thread will run for the next 7 days from the date of this thread start date. After the 7th day has passed, I'm going to either ignore future votes/requests or ask a moderator to close this thread."
"I will be starting on the list Dec 1, 2020.

This request thread will run for the next 7 days from the date of this thread start date. After the 7th day has passed, I'm going to either ignore future votes/requests or ask a moderator to close this thread."
both no bold
 
A user posted some text and a code block. I highlighted both and the Quote/Reply buttons appeared but you could not click them.
This is a bug. It generates a JS error.

If I highlight a passage that is all bold, and choose Reply, it quotes un-bolded. If I highlight a passage that has regular text and bold, those bold parts are correctly bold.
This is essentially as expected. Essentially, HTML tags will only be kept if the selection crosses their boundaries. Put a different way (more technically but I believe more accurately), HTML tags will only be kept if they are descendents of the closest common ancestor of the selection start and end. When you select within a bold tag, the closest common ancestor is the bold tag, so it won't be maintained. When you start a selection outside of a bold and then end it within it, the common ancestor would be something above the bold tag and thus it would be reproduced.
 
Expected as a programmer, not a user. :) I would expect it to work like any other type of quoting. Especially if what I am quoting is to point out or talk about the actual styling in the quote, which can happen on any forum but especially writing forums, etc. It is also losing context for those that emphasize, etc.
 
Last edited:
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.3).

Change log:
Prevent a JS error when using select-to-quote on a code tag.
There may be a delay before changes are rolled out to the XenForo Community.
 
Just to clarify, this changes quirk 1 which was just broken. As it stands, we aren't planning to make a change surrounding quirk 2 (this is a potentially significant change and this is the first feedback I recall about this behavior; the behavior should be the same going back to 1.x).
 
Top Bottom