Bug 165811 - UI: ONLY in L.O. CALC!: In a cell, to SELECT a character mouse cursor must hover AFTER THE CHARACTER (instead of, as is normal, preceding a character) … Safe Mode does not fix … "Clear Direct Formatting" IN a cell sporadically fixes …
Summary: UI: ONLY in L.O. CALC!: In a cell, to SELECT a character mouse cursor must ho...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.2.1.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.8.0 target:25.2.3 target:24...
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2025-03-18 21:22 UTC by NakedStranger
Modified: 2025-04-01 11:07 UTC (History)
3 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 NakedStranger 2025-03-18 21:22:06 UTC
Description:
ONLY in L.O. CALC!: In a cell, to SELECT a character mouse cursor must hover AFTER THE CHARACTER (instead of, as is normal, preceding a character) … Safe Mode does not fix … "Clear Direct Formatting" IN a cell sporadically fixes … if mouse cursor is hovered in front of a character and mouse is clicked & dragged, the cursur jumps in front of the character immediately preceding the one desired to be SELECTED.  "Work-Around: Always hover mouse pointer AFTER the character that you want to select in a cell & cursor will "jump" in front of the character that you want selected.  This "bug" DOES NOT OCCUR in L.O. Writer (cursor & character selection behave normally as expected & as in other programs).

Steps to Reproduce:
1.In a L.O. CALC cell containing text or digits, hover mouse cursor preceding a character as if to select the character;
2.CLICK the mouse button & attempt to select the character desired when hovering;
3.Cursor will immediately jump to the character or digit immediately preceding the one desired.


Actual Results:
Cursor will immediately jump to the character or digit immediately preceding the one desired.

Expected Results:
Cursor is supposed to START from the insertion point preceding a character and then be able to be dragged to the right over said character & select said character (instead of immediately jumping in front of the character preceding the character desired).


Reproducible: Always


User Profile Reset: Yes

Additional Info:
There was no Help from LibreOffice regarding this matter.  Research using AI tools such as CoPilot, ChatGPT, & Grok were used and despite their best troubleshooting techniques, the problem was not able to be resolved and they recommended filing a Bug Report.
Comment 1 m_a_riosv 2025-03-18 21:53:55 UTC
It seems to occur just before an open parenthesis character '('.
Clicking before '(' causes the cursor to go before the preceding character.
Version: 25.2.2.1 (X86_64) / LibreOffice Community
Build ID: 38d746d66d9b82fa248a2e90142b9dd3ddd1d6cd
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
and
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e1c7923596f39bac8ce926b56a2450911ffde4d8
CPU threads: 16; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-GB
Calc: CL threaded


Latest version that works on the ones I have installed.
Version: 24.8.6.1 (X86_64) / LibreOffice Community
Build ID: 051bf11303684a0a982c9966e8be766d0a9efbc7
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 2 Saburo 2025-03-19 08:47:31 UTC
I don't think the "(" is relevant.
I think that in Calc, Impress, and Draw, even if you specify the right half of a character, the cursor will now be placed just before that character.

commit 11b15571475414ef853e21a6c96afa2ac81f848f
author   Noel Grandin <noel.grandin@collabora.co.uk>

convert KernArray from sal_Int32 to double

which allows us to eliminate a bunch of rounding at various layers, and
consequently maintain a lot more precision
Comment 3 raal 2025-03-19 18:08:16 UTC
(In reply to Saburo from comment #2)
> I don't think the "(" is relevant.
> I think that in Calc, Impress, and Draw, even if you specify the right half
> of a character, the cursor will now be placed just before that character.
> 
> commit 11b15571475414ef853e21a6c96afa2ac81f848f
> author   Noel Grandin <noel.grandin@collabora.co.uk>
> 
> convert KernArray from sal_Int32 to double
> 
> which allows us to eliminate a bunch of rounding at various layers, and
> consequently maintain a lot more precision

CC to Noel
Comment 4 Commit Notification 2025-03-28 15:30:05 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0afe740800a5a2a4bc2041fa602b11dc31a4a4e1

tdf#165811 calc mouse select sometimes off by one char

It will be available in 25.8.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 2025-04-01 11:07:12 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/9374008fcceb521a9f81466b39b32ee13c7def49

tdf#165811 calc mouse select sometimes off by one char

It will be available in 25.2.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 2025-04-01 11:07:15 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

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

tdf#165811 calc mouse select sometimes off by one char

It will be available in 24.8.7.

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.