Bug 122397 - Editing: Writer jumps back to selected text when copying to another location using X-clipboard
Summary: Editing: Writer jumps back to selected text when copying to another location ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Multi-Page-View
  Show dependency treegraph
 
Reported: 2018-12-31 18:45 UTC by ckoresko
Modified: 2023-08-06 05:19 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ckoresko 2018-12-31 18:45:05 UTC
Description:
When editing a multi-page document, using the X clipboard to copy text between pages causes an unwanted display jump from the page where the text was pasted back to the page from which it was copied.  This is inconvenient for its own sake (since the user typically wants to continue editing where he just pasted the text).  The problem is compounded by the fact that the original text remains selected, so that if the user then starts typing the original text is deleted.

This behavior is inconsistent with the that of most (all?) other programs that support the X clipboard.  It's also inconsistent with the behavior of Writer itself when the copy-and-paste is done via the ctrl+C, ctrl+V keystroke sequences.

The current behavior is this:

* Middle-click pastes the selected text at the mouse pointer position

* The display jumps back to display the page with the previously-selected text

* The previously-selected text remains selected

Typically, the user must then manually de-select the text at its original position and then manually return to the page where he pasted it in order to continue editing there.

To improve this, it would be useful to change the middle-click behavior to be consistent with other programs that support the X clipboard:

* Middle-click pastes the selected text at the mouse pointer position (as it does currently)

* The display does not jump when the text is pasted

* The selected text that was copied is de-selected

* The text cursor moves to a position just after the pasted text

With these changes, it should be possible for the user to select text on one page of a document, scroll to another page, middle-click to paste the selected text, and continue typing without any additional steps.

Steps to Reproduce:
1.Open a multi-page document in Writer
2.Select some text on the first page
3.Scroll down a few pages and middle-click to paste the selected text

Actual Results:
Writer jumps back to the the first page of the document.  The selected text is still selected.

Expected Results:
Writer does not jump the display (it remains where it was when the user middle-clicked).  The text cursor is positioned immediately after the pasted text.  The previously-selected text is de-selected.


Reproducible: Always


User Profile Reset: No



Additional Info:
This was found and tested on various Linux distros running various versions of LibreOffice (it's a pretty old bug).  It presumably happens on all Writer versions running on X.  The obvious workaround is to use the ctrl+C, ctrl+V clipboard and just accept the efficiency hit.
Comment 1 Usama 2019-05-15 11:38:12 UTC
Thank you for reporting 

confirmed on master:
Version: 6.3.0.0.alpha0+
Build ID: 98630a0bd49bd80652145a21e4e0d0ded792b36b
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-05-04_04:44:35
Locale: tr-TR (tr_TR.UTF-8); UI-Language: en-US
Calc: threaded
Comment 2 Usama 2019-05-15 11:39:40 UTC
Jut to say it short, a jump happens on paste using the middle mouse button:

Steps to Reproduce:
1.Open a multi-page document in Writer
2.Select some text on the first page
3.Scroll down a few pages and middle-click to paste the selected text

Actual Results:
Writer jumps back to the the first page of the document.  The selected text is still selected.
Comment 3 ckoresko 2020-12-19 20:37:14 UTC
Still present on 7.0.x.
Comment 4 Quintao 2021-02-08 08:02:23 UTC
Yes, I would have reported this too at some stage, as it's quite annoying - especially if the selection is pages up or down from the place to be pasted!

One has to think, Oh my knitted socks! if I paste this with middle mouse button somewhere where the selection is not visible then the page is going to jump back to the selection, requiring scrolling again.

It is probably true that when someone selects text and pastes it onto a line it is because edits are currently being done at that line, so to jump back to the selection is irrelevant.
Comment 5 QA Administrators 2023-02-09 03:25:01 UTC Comment hidden (obsolete)
Comment 6 ckoresko 2023-08-06 05:11:44 UTC
I tested LO version 3.3.0 Writer (amd64) and the current 7.5.5.2 Writer, both on Debian 12, and confirmed that the same issue was present in both the current and the ancient versions.