Bug 96256 - Pasting text leaves focus somewhere in the middle of the document.
Summary: Pasting text leaves focus somewhere in the middle of the document.
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.0.5 release
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:5.5.0 target:5.4.0.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2015-12-04 23:10 UTC by Jerry
Modified: 2017-05-31 16:36 UTC (History)
7 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 Jerry 2015-12-04 23:10:32 UTC
When pasting text from the web or another document, after the paste, the focus is randomly located somewhere in the body of the text not at the end where the cursor should be! Not a behavior seen in earlier versions.
Comment 1 Joel Madero 2015-12-05 16:12:20 UTC
Hi Jerry,

Can you link us to a webpage you're trying to copy/paste from? I just did a test and it seemed to work fine but it was all text. Please link us to a page and provide us with your OS and then mark the bug as UNCONFIRMED. Thanks
Comment 2 Jerry 2015-12-05 17:36:35 UTC
Using Windows 7 (64bit) Service Pack 1

Duplicated the error with the following:

Open new blank LOWriter document. Left click within blank document to bring focus into document.

Open web page: http://www.spearfishlaketales.com/42bhf/bhf.htm  
Click on "Chapter 1" in the left frame.
Left click within Chapter 1 text to move focus to text frame.
Ctrl-A to highlight all text within frame.
Ctrl-C to copy highlighted text

Move to blank LOWriter document and paste with Ctrl-V

Text is pasted but focus is in the middle of page 2 of an 8 page document. Scrolling down with mouse wheel finds the text cursor at the end of the document on page 8.
Comment 3 Buovjaga 2015-12-05 20:16:03 UTC
LibO hangs on paste for me..

Win 7 Pro 64-bit, Version: 5.0.3.2 (x64)
Build ID: e5f16313668ac592c1bfb310f4390624e3dbfb75
Locale: fi-FI (fi_FI)

Version: 5.2.0.0.alpha0+
Build ID: 81fa5340191baf8687f9c82f1f414f5afc86b529
Threads 4; Ver: Windows 6.1; Render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-12-03_21:19:19
Locale: fi-FI (fi_FI)
Comment 4 A (Andy) 2015-12-26 20:44:05 UTC
Reproducible with LO 5.1.0.1, Win 8.1

But an important remark: If I select everything with CTRL + A then LO hangs up (another bug) as for Beluga and it is not possible to test it.  Therefore, I only selected the text with the mouse (without the image at the top).  Then it was reproducible.
Comment 5 QA Administrators 2017-01-03 19:54:35 UTC Comment hidden (obsolete)
Comment 6 Telesto 2017-04-27 12:56:53 UTC
Still found in:
Version: 5.4.0.0.alpha0+
Build ID: a917902c48f21d04039da86048c5c36555137d7e
CPU threads: 4; OS: Windows 6.2; UI render: default; 
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2017-04-24_23:35:22
Locale: nl-NL (nl_NL); Calc: CL

also in:
Version: 5.0.0.5
Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b
Locale: nl-NL (nl_NL)

but not in
Versie: 4.4.6.3 
Build ID: e8938fd3328e95dcf59dd64e7facd2c7d67c704d
Locale: nl_NL
Comment 7 raal 2017-05-16 15:41:48 UTC
 4dd49563a4368db46937562491e891b2b8569f4b is the first bad commit
commit 4dd49563a4368db46937562491e891b2b8569f4b
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Sun Jun 7 05:48:49 2015 -0500

    source 587006cac508616f486aea45e265a170bcccdc87
author	Michael Stahl <mstahl@redhat.com>	2015-06-05 21:56:07 (GMT)
committer	Michael Stahl <mstahl@redhat.com>	2015-06-05 22:32:47 (GMT)
commit 587006cac508616f486aea45e265a170bcccdc87 (patch)
tree 792a0095b756496bf3c2213b14446979dc3f6a97
parent c27798b20097602739e3e81a5063109b8c66447d (diff)
tdf#91602: sw: prevent recursive layout crash
Comment 8 Michael Stahl (allotropia) 2017-05-26 15:57:25 UTC
hmm... it looks like it's caused by SwViewShell::SizeChgNotify()
- if it sees ActionPend() it calls PageNumNotify() which
ends up with the view on page 2, and otherwise it calls
SizeNotify() which ends up with the view on the last page
Comment 9 Michael Stahl (allotropia) 2017-05-29 21:23:47 UTC
hopefully fixed on master
Comment 10 Commit Notification 2017-05-29 21:24:08 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6f1530bfdefc8e4deabf37ab337e09a89d3841b3

tdf#96256 sw: fix scrolling to cursor after paste

It will be available in 5.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2017-05-30 13:10:02 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c3a09bc2025c8cb3c52d45f6a65152d1aebf0536&h=libreoffice-5-4

tdf#96256 sw: fix scrolling to cursor after paste

It will be available in 5.4.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Buovjaga 2017-05-31 16:36:51 UTC
Works.

Version: 5.5.0.0.alpha0+
Build ID: b08217989558addbcaded122a4e7211ae24bbcff
CPU threads: 4; OS: Windows 6.19; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-05-31_06:31:36
Locale: fi-FI (fi_FI); Calc: group

Arch Linux 64-bit, KDE Plasma 5
Version: 5.5.0.0.alpha0+
Build ID: 963137415bcdf3e7a26ce5d258302f4e39e294db
CPU threads: 8; OS: Linux 4.11; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on May 31st 2017