Bug 133958 - Check Spelling (F7): cursor unexpectedly jumps backwards when correcting text
Summary: Check Spelling (F7): cursor unexpectedly jumps backwards when correcting text
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Linguistic (show other bugs)
Version:
(earliest affected)
6.3.0.4 release
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.0.1 target:6.4.7 target:7.1.0
Keywords: bisected, regression
Depends on:
Blocks: Spell-Checking-Dialog
  Show dependency treegraph
 
Reported: 2020-06-13 11:39 UTC by R. Green
Modified: 2020-08-30 10:10 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Writer doc. showing entry problem in spellchecker (21.76 KB, application/vnd.oasis.opendocument.text)
2020-06-13 11:39 UTC, R. Green
Details

Note You need to log in before you can comment on or make changes to this bug.
Description R. Green 2020-06-13 11:39:11 UTC
Created attachment 161948 [details]
Writer doc. showing entry problem in spellchecker

Version: 6.4.4.2 (x64)
Build ID: 3d775be2011f3886db32dfd395a6a6d1ca2630ff
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; 
Locale: en-GB (en_GB); UI-Language: en-GB
Calc: threaded

1. Open the attached writer file and click on the "Check Spelling" icon (F7). Some spelling mistakes have been introduced into the text to illustrate the bug.

2. Double click the text highlighted in red and type in any word of more than two letters.

EXPECTED RESULT: The letters are entered sequentially.
RESULT: After typing two letters the cursor jumps back to the beginning of the word.
Comment 1 Dieter 2020-06-16 11:19:44 UTC
I confirm it with

Version: 7.0.0.0.beta1 (x64)
Build ID: 94f789cbb33335b4a511c319542c7bdc31ff3b3c
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL
Comment 2 Michael Stahl (allotropia) 2020-07-28 18:20:58 UTC
regression from:

commit 5261417cbb3051b812164838d19c0f748573df45
Author:     Caolán McNamara <caolanm@redhat.com>
AuthorDate: Fri Jun 14 21:56:44 2019 +0100
Commit:     Caolán McNamara <caolanm@redhat.com>
CommitDate: Fri Jun 21 21:33:30 2019 +0200

    weld SpellDialog
    
    a) use EditEngine instead of TextEngine as the former can be hosted in a
       foreign widget
    b) use a SfxGrabBagItem to hold the custom spellchecking info inside the
       EditEngine
    c) in longer paragraphs the current word is now auto-scrolled into view
    d) rename Invalidate to InvalidateDialog
Comment 3 Michael Stahl (allotropia) 2020-07-29 08:42:36 UTC
...was backported to 6.3 as 243b5b392906042ab03800e0b5765e6f3513372c
Comment 4 Caolán McNamara 2020-07-29 09:40:05 UTC
The SetSelection in MoveErrorMarkTo seems to be the problem
Comment 5 Commit Notification 2020-07-29 12:54:18 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/5511f3de1afe53088416d793ce08d61fd961dfa9

tdf#133958 only move the selection to the error if its not already there

It will be available in 7.0.1.

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 2020-07-29 12:54:33 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/03b462fb609c57cb098069f19b7076c57710906e

tdf#133958 only move the selection to the error if its not already there

It will be available in 6.4.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.
Comment 7 Commit Notification 2020-07-29 14:16:19 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

tdf#133958 only move the selection to the error if its not already there

It will be available in 7.1.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 8 Dieter 2020-08-30 10:10:31 UTC
Verified with

Version: 7.1.0.0.alpha0+ (x64)
Build ID: 5e9d24f08551c06a20aa01408eb708c813fe20c4
CPU threads: 4; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: threaded