Bug 160907

Summary: Text box form control loses focus when trying to change font with toolbar or sidebar (except with GTK)
Product: LibreOffice Reporter: Stéphane Guillou (stragu) <stephane.guillou>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: robert
Priority: medium    
Version: Inherited From OOo   
Hardware: x86-64 (AMD64)   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=160906
https://bugs.documentfoundation.org/show_bug.cgi?id=107092
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 107742    

Description Stéphane Guillou (stragu) 2024-05-02 12:10:58 UTC
Steps:
1. Open attachment 132471 [details]
2. Click in large text box control in section 1 (it has the option "Text type: Multi-line with formatting")
3. Write "Test"
4. Select the word
5. Change font with toolbar or sidebar dropdowns

Result: focus is lost, so font is not changed.
Workarounds, at step 5:
- use top menu: Format > Character
- use context menu: right-click > Font Name
(Note that you might run into crash bug 160906 when successfully changing the font.)

Reproduced in:

Version: 7.5.0.3 (X86_64) / LibreOffice Community
Build ID: c21113d003cd3efa8c53188764377a8272d9d6de
CPU threads: 4; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

and a recent trunk build:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f61ffdfa1a56b1b1fa1aa4f269477e1d1d475955
CPU threads: 4; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

As well as OOo 3.3.
Also with gen and kf5 VCL plugin.

Not reproduced with gtk3 VCL plugin.
Comment 1 Robert Großkopf 2024-05-03 10:02:26 UTC
Font for form controls will be set in properties of a form control. So you have to change through 
Form → Design Mode
right mouse click on control and get Control Properties…

Don't know how this form has been created, but this possibility to change the font is greyed out. So you could change the font when entering new content by marking the content with right mouse click in context menu.
Comment 2 Stéphane Guillou (stragu) 2024-05-03 11:57:34 UTC
(In reply to Robert Großkopf from comment #1)
> Don't know how this form has been created, but this possibility to change
> the font is greyed out. So you could change the font when entering new
> content by marking the content with right mouse click in context menu.
That's because that text box control is set to "Text type = Multi-line with formatting", which makes it possible to apply direct formatting on (segments of) text directly. If you change that to "Text type = Multi-line", the "Font" setting becomes available again.
Comment 3 Robert Großkopf 2024-05-04 06:34:05 UTC
Could confirm control is loosing focus. Impossible to set the style through menu.