Bug 125262 - Copied text gains trailing whitespace (and new paragraph?) when pasted outside LO (like in rich mail) because pasted as Text Body?
Summary: Copied text gains trailing whitespace (and new paragraph?) when pasted outsid...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Cut-Copy
  Show dependency treegraph
 
Reported: 2019-05-13 13:00 UTC by david.cortes.rivera
Modified: 2023-05-26 17:49 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
example_step1 (33.94 KB, image/png)
2019-05-13 14:50 UTC, david.cortes.rivera
Details
example_step2 (13.66 KB, image/png)
2019-05-13 14:50 UTC, david.cortes.rivera
Details
example_step3 (15.56 KB, image/png)
2019-05-13 14:51 UTC, david.cortes.rivera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description david.cortes.rivera 2019-05-13 13:00:14 UTC
Steps to reproduce:
* Launch LO Writer.
* Write some multi-word paragraph.
* Select some whole word (e.g. by double clicking it).
* Paste said word outside libreoffice into something that would support formatted text, such as some web forms fillable through browsers, or writing/replying-to messages in email clients with formatting.

Expected behavior: should paste the word as-is.

Actual behavior: in most non-smart software (e.g. chrome), will add an additional space at the beginning of the word when pasting it, with some exceptions such as MS Office products which will not add the space if it's pasted at the beginning of a paragraph.
Comment 1 Timur 2019-05-13 14:01:38 UTC
I do not reproduce with LO 6.2 copy to Chrome. Please attach a source document, write in it exact steps and word to be selected and put inside some screen shots with selection and paste.
Comment 2 Timur 2019-05-13 14:03:10 UTC Comment hidden (obsolete)
Comment 3 david.cortes.rivera 2019-05-13 14:50:24 UTC
Created attachment 151365 [details]
example_step1
Comment 4 david.cortes.rivera 2019-05-13 14:50:46 UTC
Created attachment 151366 [details]
example_step2
Comment 5 david.cortes.rivera 2019-05-13 14:51:10 UTC
Created attachment 151367 [details]
example_step3
Comment 6 david.cortes.rivera 2019-05-13 14:54:12 UTC
(In reply to Timur from comment #1)
> I do not reproduce with LO 6.2 copy to Chrome. Please attach a source
> document, write in it exact steps and word to be selected and put inside
> some screen shots with selection and paste.

Attached an example with screenshots on Yahoo webmail, which allows formatted text in there, but note that this is not the only web page in which it happens (other example: asana [paid]), and in others it adds only whitespace instead of whitespace + newline.

I don't think there's any need to upload a .odt as it happens with any unsaved document under a default LO Writer install in windows.
Comment 7 Timur 2019-05-13 15:23:26 UTC
I reproduce with coping a word to rich Gmail client.
But I'm not sure how that happens, so I'll let someone else confirm it.
Comment 8 Michael Bauer 2019-11-06 09:54:54 UTC
Following the steps above (all on Win 10):

1. Pasting into 1and1 online email in Vivaldi and Firefox (both latest), pasting from LO into a blank new email results in no space in front of the word but a *linebreak* is added. The same steps pasting from Word simply paste the word, no initial space or linebreak after added.

2. Pasting into Gmail in Firefox, pasting from LO adds no space in front but the *cursor* is now at the beginning of the word. Pasting from Word, a space is added after the word and the cursor is at the very end.

The above scenarios were pasting into a blank email. If I write a multi-word sentence into the email first (ends in . no space added), the outcomes change:

1. Pasting into 1and1 online email in Vivaldi and Firefox, pasting from LO adds two new lines i.e. I have my original sentence on line one, the pasted word on line two and the cursor is on an empty line three. If I select all and paste it into Rishida's unicode converter (https://r12a.github.io/app-conversion/) I get 0054 0068 0065 0020 0063 0061 0074 0020 0073 0061 0074 002E 000A 006D 0061 0074 000A (the words were The cat sat. mat).
Pasting from Word, no space is added after . but there is one at the end (the conversion says 0054 0068 0065 0020 0063 0061 0074 0020 0073 0061 0074 002E 006D 0061 0074 00A0)

2. Pasting into Gmail in Firefox, pasting from LO, the outcome is bizarre. The word is pasted into a new line, cursor at the beginning of the word. If I left arrow, I end up at the *end* of the word i.e. the left arrow action outcome is jump to word end going *right*. If I left arrow then, it moves left. Once I'm in the previous line, if I go right arrow, I can reach the end of line but it will not move into the new line. If I select all and paste it into Rishida's unicode converter I get 0054 0068 0065 0020 0063 0061 0073 0074 0020 0073 0061 0074 002E 0009 0009 0009 0009 0063 0061 0074 (the words were The cat sat. cat) suggesting LO somehow carries a shedload of tabs?
Pasting from Word simply adds a space after the . then the word, then another space. It also carries formatting of some nature. The converter tells me it's 0054 0068 0065 0020 0063 0061 0074 0020 0073 0061 0074 002E 006F 006E 0020 (the words being The cat sat. on)

It seems weirdness happens when copying and pasting from word processors into online email but LO is way out in the stratosphere with weirdness.
Comment 9 QA Administrators 2021-11-06 03:54:44 UTC Comment hidden (obsolete)
Comment 10 david.cortes.rivera 2021-11-06 04:01:03 UTC
(In reply to QA Administrators from comment #9)
> Dear david.cortes.rivera,
> 
> To make sure we're focusing on the bugs that affect our users today,
> LibreOffice QA is asking bug reporters and confirmers to retest open,
> confirmed bugs which have not been touched for over a year.
> 
> There have been thousands of bug fixes and commits since anyone checked on
> this bug report. During that time, it's possible that the bug has been
> fixed, or the details of the problem have changed. We'd really appreciate
> your help in getting confirmation that the bug is still present.
> 
> If you have time, please do the following:
> 
> Test to see if the bug is still present with the latest version of
> LibreOffice from https://www.libreoffice.org/download/
> 
> If the bug is present, please leave a comment that includes the information
> from Help - About LibreOffice.
>  
> If the bug is NOT present, please set the bug's Status field to
> RESOLVED-WORKSFORME and leave a comment that includes the information from
> Help - About LibreOffice.
> 
> Please DO NOT
> 
> Update the version field
> Reply via email (please reply directly on the bug tracker)
> Set the bug's Status field to RESOLVED - FIXED (this status has a particular
> meaning that is not 
> appropriate in this case)
> 
> 
> If you want to do more to help you can test to see if your issue is a
> REGRESSION. To do so:
> 1. Download and install oldest version of LibreOffice (usually 3.3 unless
> your bug pertains to a feature added after 3.3) from
> https://downloadarchive.documentfoundation.org/libreoffice/old/
> 
> 2. Test your bug
> 3. Leave a comment with your results.
> 4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
> 4b. If the bug was not present in 3.3 - add 'regression' to keyword
> 
> 
> Feel free to come ask questions or to say hello in our QA chat:
> https://web.libera.chat/?settings=#libreoffice-qa
> 
> Thank you for helping us make LibreOffice even better for everyone!
> 
> Warm Regards,
> QA Team
> 
> MassPing-UntouchedBug

Version: 7.2.2.2 / LibreOffice Community
Build ID: 20(Build:2)
CPU threads: 16; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-US (en_US.UTF-8); UI: en-US
Debian package version: 1:7.2.2-1
Calc: threaded