Bug 151274

Summary: Event "Losing focus" happens twice for Listbox and Combobox in a tablecontrol
Product: LibreOffice Reporter: Robert Großkopf <robert>
Component: BaseAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal    
Priority: medium    
Version: 7.4.1.2 release   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=88552
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: Open the form "Form_tablecontrol" different fields are linked to event "Losing focus"

Description Robert Großkopf 2022-10-02 14:48:26 UTC
Created attachment 182785 [details]
Open the form "Form_tablecontrol" different fields are linked to event "Losing focus"

Open the attached database. 
Macros should be allowed.
Open the form "Form_tablecontrol".
There are four tablecontrols, all the same content.
Difference is the field, which is set to show the event "Losing focus".
For normal textboxes wit will work without problems.
Set the cursor in first field of second tablecontrol. It will show what is happening for a listbox. Move from the left to the right by tab.

The event "Losing focus" will happen when arriving the listbox. It will also be happen when losing the listbox.
The same behavior will appear for a combobox (third tablecontrol)

The behavior when arriving the listbox and showing the event "Losing focus" isn't the same as the behavior when receiving focus. It is impossible to set a messagebox to the event "receiving focus" without getting a loop (focus recived for a field, for the messagebox, again for the field …)

Expected behavior: "losing focus" should only appear while the cursor will get out of a field, not while getting in a field.
Comment 1 Gerhard Weydt 2023-02-02 22:13:57 UTC
I can confirm the behaviour in
Version: 7.3.3.2 (x64) / LibreOffice Community
Build ID: d1d0ea68f081ee2800a922cac8f79445e4603348
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded

and

Version: 7.5.0.0.beta1 (X86_64) / LibreOffice Community
Build ID: 3aca23eec42e9d6fbe57071d7633ae1fc4bc5fcc
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: threaded