Bug 157533 - Unpredictable cursor and keyboard behaviour after deselecting a math formula
Summary: Unpredictable cursor and keyboard behaviour after deselecting a math formula
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) Windows (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Formula-Editor
  Show dependency treegraph
 
Reported: 2023-09-30 16:55 UTC by internet657-84eddea134
Modified: 2023-10-01 10:26 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Provides an example of the bug described here (40.63 KB, application/vnd.oasis.opendocument.text)
2023-09-30 21:04 UTC, internet657-84eddea134
Details

Note You need to log in before you can comment on or make changes to this bug.
Description internet657-84eddea134 2023-09-30 16:55:08 UTC
Description:
When deselecting a math formula that is the first element of a line in a table cell, the keyboard is unresponsive and the cursor cannot be moved using the arrow keys, unless I use the mouse to reposition it.

Steps to Reproduce:
1. Create a new table with the Default Style.
2. Insert a math formula at the start of any line, whether on the first line of the cell, after an explicit line break or a line break caused by word wrapping.
3. Press "Escape" once to exit the math formula editor. The math formula is now selected.
4. Press "Escape" once more.

Actual Results:
The cursor is now positioned at the start of a line, before the formula, and cannot be moved using the keybord (using the arrow keys).
Pressing "Enter" puts you back into the formula editor.
Pressing "Delete" puts you at the start of the document.
Other keyboard keys seem to have no effect.

Expected Results:
The cursor should be positioned after the formula, and be responsive to keyboard inputs.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
More generally, the cursor shows very erratic behaviour.

Normally, after deselecting a math formula by pressing "Escape", the cursor should be placed *after* the math formula, and the cursor should be responsive to keyboard inputs.

Outside tables, the expected behaviour sometimes happens. Other times however, unrelated to whether the formula is the first element of a line and depending on the formula’s content or position, the cursor is placed before the formula after deselecting the formula, but the cursor is still responsive to keyboard inputs, and the "Enter" and "Delete" keys behave normally (as opposed to the behaviour described here in "Actual Results").

Inside any table, after deselecting a formula that is *not* positioned at the start of a line, the cursor will be placed before the formula, whereas it should be placed after. The cursor remains responsive to keyboard inputs however, and the "Enter" and "Delete" keys behave normally (as opposed to the behaviour described here in "Actual Results").

Inside tables with style "None", after deselecting a math formula that is at the start of a line, the cursor is repositioned at the end of the previous table cell. The keyboard behaves normally.

Inside tables with style "Default", after deselecting a math formula that is at the start of a line, the problem described here happens.

Version: 7.6.1.2 (X86_64) / LibreOffice Community
Build ID: f5defcebd022c5bc36bbb79be232cb6926d8f674
CPU threads: 12; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Calc: CL threaded
Comment 1 m_a_riosv 2023-09-30 20:49:02 UTC
Please attach a sample file.
Comment 2 internet657-84eddea134 2023-09-30 21:04:09 UTC
Created attachment 189916 [details]
Provides an example of the bug described here

Done.
Comment 3 m_a_riosv 2023-09-30 21:35:49 UTC
Reproducible with:
Version: 7.6.1.2 (X86_64) / LibreOffice Community
Build ID: f5defcebd022c5bc36bbb79be232cb6926d8f674
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
and
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5e9c8d21874eea8cb5adf2ecab1905295af2308f
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded Jumbo