Bug 141079 - Hard to select field when it's the first character in a table cell
Summary: Hard to select field when it's the first character in a table cell
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1 all versions
Hardware: All All
: medium normal
Assignee: Samuel Mehrbrodt (allotropia)
URL:
Whiteboard: target:7.2.0 target:7.1.3 target:7.0.6
Keywords:
Depends on:
Blocks: Writer-UX
  Show dependency treegraph
 
Reported: 2021-03-17 13:12 UTC by Samuel Mehrbrodt (allotropia)
Modified: 2021-03-26 15:56 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
bugdoc (8.58 KB, application/vnd.oasis.opendocument.text)
2021-03-17 13:12 UTC, Samuel Mehrbrodt (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Mehrbrodt (allotropia) 2021-03-17 13:12:01 UTC
Created attachment 170530 [details]
bugdoc

1. Open bugdoc
2. Try to select the field in the first table cell with the mouse

Expected:
You click on the field, and the cursor goes into the field

Actual:
You probably start dragging the table itself
Comment 1 Samuel Mehrbrodt (allotropia) 2021-03-17 13:14:07 UTC
Regression from:

commit 4ce8120f1e53f7b81e653b01d141643013bc69ab
Author: Michael Stahl <Michael.Stahl@cib.de>
Date:   Fri Jan 24 19:05:40 2020 +0100

    tdf#45589 sw: create and paint text portions for bookmarks

https://git.libreoffice.org/core/+/4ce8120f1e53f7b81e653b01d141643013bc69ab%5E%21

It was an intentional change, see this part of the commit msg:

>  * SwLinePortion::PrePaint() wants to avoid moving the portion
>    half-outside the frame but often it looks better that way (previously
>    it was misaligned, now it's half-outside).
Comment 2 Samuel Mehrbrodt (allotropia) 2021-03-18 08:44:17 UTC
After more investigation, it turned out that above did not really affect field selection, only the display.

The following commit changed the behavior, so that the field can no longer be selected properly (or bring up the field edit dialog when double clicked):

commit 27c46ecf34b32bae1806d3fc0e1684179301feb8
Author: Miklos Vajna <vmiklos@collabora.com>
Date:   Thu Aug 1 15:31:10 2019 +0200

    sw comments on frames: improve doc coordinates -> doc model pos conversion

https://git.libreoffice.org/core/commit/27c46ecf34b32bae1806d3fc0e1684179301feb8
Comment 3 Miklos Vajna 2021-03-18 09:08:17 UTC
I'm a bit confused why the above commit affects script field portions. Clearly the intention is to change the behavior only for fly content portions and postit portions. Anyhow, testImageComment should cover the commented-image case, so as long as that passes, feel free to tweak the conditions in ConsiderNextPortionForCursorOffset().
Comment 4 Commit Notification 2021-03-25 06:24:27 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5302268de6a33716c7746aa13232746ad2f2b561

tdf#141079 Restore double click behavior for script fields

It will be available in 7.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2021-03-26 15:56:31 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/9804b72b76def2c17a4b40166eb47be8fe83d3df

tdf#141079 Restore double click behavior for script fields

It will be available in 7.1.3.

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

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2021-03-26 15:56:46 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/bf71581e49130e25a5f8961902ae38e87a8248e9

tdf#141079 Restore double click behavior for script fields

It will be available in 7.0.6.

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

Affected users are encouraged to test the fix and report feedback.