https://bugs.documentfoundation.org/show_bug.cgi?id=167930

            Bug ID: 167930
           Summary: Removing the accessible selection unexpectedly sets
                    the caret offset to 0
           Product: LibreOffice
           Version: 25.2.5.2 release
          Hardware: All
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: [email protected]
          Reporter: [email protected]

Description:
Using AT-SPI2 to remove/clear the selection in a paragraph results in the caret
being moved to the start of the paragraph. It should instead leave the caret
where it was, but unselect the text.

Steps to Reproduce:
1. Create a new document and type at least 10 characters.
2. Select some characters in the middle.
3. Use AT-SPI2 to remove the selection.

Here's an example of doing 3 via Accerciser's iPython console:

  In: text = acc.queryText()
  In: text.caretOffset
  Out: 8 << End of selection. Good.

  In: text.getNSelections()
  Out: 1

  In: selection = text.getSelection(0)
  In: selection[0]
  Out: 4 << Start offset of selection. Good.

  In: selection[1]
  Out: 8 << End offset of selection, caret offset. Good.

  In: text.removeSelection(0)
  Out: True

  In: text.caretOffset
  Out: 0 << Why??

Actual Results:
Removing the selection resets the caret to the beginning of the paragraph.

Expected Results:
Removing the selection would leave the caret in place (in the above steps,
offset 8).


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.2.5.2 (X86_64)
Build ID: 520(Build:2)
CPU threads: 48; OS: Linux 6.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to