Fixed Pasting atop a selected word inserts 1 or 2 spaces

frm

Well-known member
Affected version
2.2 Beta 5
Pasting into brackets puts a space in front and behind the word brackets (in this instance, BB code) if you first had something there such as CODE and change it to QUOTE

Code:
This is code but I am meaning to change it to QUOTE

When I double click "CODE" to paste "QUOTE", it will create the spaces which must be removed manually.

[ QUOTE ]This is code but I am meaning to change it to QUOTE[/ QUOTE ]

Furthermore, if I just select say THIS word to change to "QUOTE", with or without double-clicking, it will only insert 1 space in the rear.

Furthermore, if I just select say QUOTE word to change to "QUOTE", without double-clicking, it will only insert 1 space in the rear... which is acceptable if you double click to insert as it selects the word "THIS" plus the trailing space to paste "QUOTE" and adds the trailing space.

Also tried to paste CTRL+V (as I was moving a phrase around in the first paragraph) will put a space before and after: (in this instance, BB code)
 
I probably understand what eccentricities you are facing. From my experience, bbcode editor works better for the modifications you are trying to make. And try to use Control+Shift+V instead of Control+V for pasting in rich editor. Usually works better wrt spaces around pasted text.
 
CTRL+Shift+V in the rich editor does indeed remove the space before and after, however, it also triggers my Awesome Screenshot Chrome extension (though, this is changeable by its options; however, the default is CTRL+Shift+V).

Also, CTRL+C and CTRL+V are more widely known to most as a copy/paste shortcut as it's been used by Microsoft users for much longer, than perhaps, XF has even been around (found and answer to Word 2010 but can't seem to find any to Word 2008 and prior, but to my recollection, it's always been CTRL+C/CTRL+V).

 
I'm not seeing that here so I'm either not understanding or it is browser specific.

Can you provide the specific steps required to reproduce it and confirm the specific browser/OS combo where you can reproduce it?
 
Can you provide the specific steps required to reproduce it and confirm the specific browser/OS combo where you can reproduce it?
Windows 10 / Chrome Version 84.0.4147.135 (Official Build) (64-bit)

Make a new reply to this and in the rich text editor, paste a word over a highlighted word or with CTRL+V and spaces will be added.

Here is a sentence the NEXT WORD AFTER THIS test will be inserted right before "will" with CTRL+V when I move my cursor there and it will paste "test" with a trailing space. However, it should only paste "test" as that is on my clipboard. There should be no trailing space, in my opinion.

If you select a word such as THIS NEXT WORD test by highlighting it and CTRL+V, it will put a space after "test".
1599062797314.png
1599062958696.png

But if hello were in brackets, such as BB code, and you wanted to paste in test instead, it will put a space before and after [ test ].
1599062857697.png
1599062885792.png
1599062916344.png

Hope this is helpful in replicating this.

Edit: In the first example of hello to test, it only puts the space after test and not before as seen in the snipped screenshot.
 

Attachments

  • 1599062889126.webp
    1599062889126.webp
    8.6 KB · Views: 2
Last edited:
From my experience, bbcode editor works better for the modifications you are trying to make.
This appears to be true. However, as we can make our own custom BB code (test/hello), it seems as if it should work in both rich editor and BB code editor, as the custom BB code does not render in rich view.

I'm unsure if it will react the same in parenthesis, but let's give it a shot with hello to test: ( test )
1599064409674.png
1599064437337.png
1599064461420.png
Confirmed to insert 2 spaces in parentheses.

...how about a common character like "X"?

X test X
1599064507702.png
1599064527571.png
Confirmed to insert 2 spaces, probably despite what you are inserting between, which could be problematic in CODE formatting to replace a h1* tag with h2 with the BB code typed out as well.
HTML:
< h2 >Test</ h2 >
1599064661712.png
1599064695081.png

In summary, pasting is inserting spaces before and after (mostly after) and is unpredictable depending on where it's being pasted, requiring manual edits which is a nuisance when the clipboard does not have a space in it.
 
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.0 Beta 6).

Change log:
Trim surrounding whitespace when pasting content from the RTE into the RTE. (This whitespace does not represent something in the clipboard.)
There may be a delay before changes are rolled out to the XenForo Community.
 
Top Bottom