Bug 166945 - Mouse cursor insertion is offset to left of cursor when right-clicking
Summary: Mouse cursor insertion is offset to left of cursor when right-clicking
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+
Hardware: All All
: medium minor
Assignee: Justin L
URL:
Whiteboard: target:26.8.0 target:25.8.5 target:26...
Keywords: bibisected, bisected, regression
: 167568 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-06-10 18:51 UTC by scott4aves
Modified: 2026-01-08 14:21 UTC (History)
4 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 scott4aves 2025-06-10 18:51:45 UTC
Unlike any other application on my Mac, when I use the cursor to create an insertion point, that point always ends up one character to the left of the intended spot. Very frustrating.
Comment 1 m_a_riosv 2025-07-20 21:13:41 UTC
*** Bug 167568 has been marked as a duplicate of this bug. ***
Comment 2 Buovjaga 2025-12-31 19:46:58 UTC
Scott, Foej: was this a new issue in 24.8 or have you seen this with older versions? Do you still see this in 25.8?
Comment 3 Foej Ahmed 2026-01-01 14:25:35 UTC
(In reply to Buovjaga from comment #2)
> Scott, Foej: was this a new issue in 24.8 or have you seen this with older
> versions? Do you still see this in 25.8?

yes, still see this in 25.8.4.2
Comment 4 Buovjaga 2026-01-01 17:18:53 UTC
(In reply to Foej Ahmed from comment #3)
> (In reply to Buovjaga from comment #2)
> > Scott, Foej: was this a new issue in 24.8 or have you seen this with older
> > versions? Do you still see this in 25.8?
> 
> yes, still see this in 25.8.4.2

And how long have you been using LibreOffice and what was the earliest version you saw this with?
Comment 5 Foej Ahmed 2026-01-04 05:43:42 UTC
(In reply to Buovjaga from comment #4)
> (In reply to Foej Ahmed from comment #3)
> > (In reply to Buovjaga from comment #2)
> > > Scott, Foej: was this a new issue in 24.8 or have you seen this with older
> > > versions? Do you still see this in 25.8?
> > 
> > yes, still see this in 25.8.4.2
> 
> And how long have you been using LibreOffice and what was the earliest
> version you saw this with?

noticed it in 24.8.
Comment 6 Buovjaga 2026-01-04 13:45:29 UTC
Bibisected with win64-24.8 to 242f6985556af7aac77b68c6dfea20d4b32c5f52
tdf#111969 sw: acknowledge that last half-character for context menu

Methodology was to use 110% zoom and to always right-click next to the same char. With formatting marks on, I placed the cursor just to the right of the space formatting mark.
Comment 7 Justin L 2026-01-05 19:45:16 UTC
Yup - and I'm fine with this.

You don't "right-click" in order to set the cursor. That is what a normal click is for. You right-click in order to get a context menu. That context menu is acting on the contents of what you right-clicked on. The most accurate "cursor position" to describe what you right-clicked on is the position before the character.

If there is a problem here, it is that the cursor actually moves at all when right-clicking. IMHO, it should have stayed wherever it was before.

Otherwise, someone needs to write code to specifically to leave the cursor in the same position that a left-click would have put it.

I'd argue this is not a regression (just a different side effect), but I'll leave that status alone. Removing "blame" though.
Comment 8 Justin L 2026-01-05 20:14:43 UTC
(In reply to m_a_riosv from comment #1)
> *** Bug 167568 has been marked as a duplicate of this bug. ***

Hmmm. In the case of PASTE, the right-click isn't acting on what is under the cursor, but is trying to position itself. OK - that becomes a problem.
Comment 9 Commit Notification 2026-01-06 12:31:54 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#166945 Revert "tdf#111969 sw: ... last half-character for context menu"

It will be available in 26.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 10 Commit Notification 2026-01-08 13:42:56 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

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

tdf#166945 Revert "tdf#111969 sw: ... last half-character for context menu"

It will be available in 25.8.5.

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 11 Justin L 2026-01-08 13:54:14 UTC
The 26.2 packport is in progress - waiting for CI to finally finish.

For the context menu, one idea is to move the cursor twice. Once as done before - so that the context menu populates with the correct context (like hyperlinks, smart tags content controls etc), and then afterwards moving the cursor to the 'closest mouse position'.

However, that almost certainly will cause other problems - some of the commands might not look 'backward' and therefore will not find the control they are supposed to act on. In the worst case they might act on a nullptr (by assuming that control exists at the cursor point). So making such a change would require a LOT of testing.
Comment 12 Commit Notification 2026-01-08 14:21:04 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-26-2":

https://git.libreoffice.org/core/commit/3c79df26bb00ac886e0ab0b66cc9420dc73ce5a0

tdf#166945 Revert "tdf#111969 sw: ... last half-character for context menu"

It will be available in 26.2.0.2.

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.