Bug 158571

Summary: Typing into a text content control replaces the placeholder but moves the cursor outside the control
Product: LibreOffice Reporter: Gabor Kelemen (allotropia) <kelemeng>
Component: WriterAssignee: Gabor Kelemen (allotropia) <kelemeng>
Status: ASSIGNED ---    
Severity: normal CC: vmiklos
Priority: medium Keywords: bibisected, bisected, regression
Version: 7.4.0.3 release   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 113363    
Attachments: How it looks after inserting the content control
The content control after typing two characters: one inside, the other outside

Description Gabor Kelemen (allotropia) 2023-12-06 22:15:22 UTC
Created attachment 191282 [details]
How it looks after inserting the content control

When a Rich text content control is inserted in Writer and the user starts to type instantly (as the placeholder suggests), the placeholder text is replaced by the first letter, but the cursor is moved outside of the content control.

1. Go to Form - Content Controls - Rich text
2. Start typing some letters
-> the first letter replaces the placeholder text, the subsequent ones are outside of the content control.

Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 43967453e15e1d054972a7586cfef8f8e0866270
CPU threads: 15; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: threaded

Started in 7.4, with:
https://git.libreoffice.org/core/+/1e9416fac497a58be04011cfa0ffce9c74a9e397

author	Miklos Vajna <vmiklos@collabora.com>	Wed May 11 09:29:05 2022 +0200
committer	Miklos Vajna <vmiklos@collabora.com>	Wed May 11 12:22:48 2022 +0200

sw content controls: introduce a word breaking dummy char at the end

Before it was not perfect (but much better): typed characters continued to be inserted into the content control, but pressing right arrow moved the cursor behind the first character after the control, and not between the end and the first character. 
Now the cursor can be moved back to the content control, but only before the last character inside.

For comparison Word does it
Comment 1 Gabor Kelemen (allotropia) 2023-12-06 22:16:02 UTC
Created attachment 191283 [details]
The content control after typing two characters: one inside, the other outside
Comment 2 Gabor Kelemen (allotropia) 2023-12-06 22:16:52 UTC
Reserving.