Bug 142783 - SELECTING Date Field dropdown causes 'When losing focus' event.
Summary: SELECTING Date Field dropdown causes 'When losing focus' event.
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0 target:7.5.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2021-06-11 07:55 UTC by David Watford
Modified: 2023-02-23 10:10 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
A sheet re-explaining the problem & a Dialog to show the problem. (23.42 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-10-13 19:40 UTC, David Watford
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Watford 2021-06-11 07:55:51 UTC
Situation first found after update from 7.0.6.2 to 7.1.3.2 also in 7.1.4.2
All previous version used did not trigger that effect.
Comment 1 Marina Bakutina 2021-07-28 20:39:32 UTC
please,add more infotmation
Steps
Comment 2 David Watford 2021-08-03 12:25:33 UTC
I cannot really add to initial comment.
LO V7.1.x.x - Clicking Date Dropdown causes "When losing Focus Event" 
LO V7.0.x.x - Clicking Date Dropdown does not cause "When losing Focus Event"
There is another difference between the versions:
      LO V7.1.x.x Requires a double-click or Enter to select a date.
      LO V7.0.x.x Just requires a click to select a date.
I understand the update in that instance.
However, I cannot understand why clicking the Dropdown should cause the event mentioned.
As a comparison: Clicking a Combobox Dropdown does not cause "When losing Focus Event"
Comment 3 David Watford 2022-05-03 10:34:17 UTC
The problem still exists on latest versions 7.2.6 & 7.3.2.
I cannot hink of any further explanation that already stated:
Comment 4 David Watford 2022-05-03 10:35:47 UTC
The problem still exists on latest versions 7.2.6 & 7.3.2.
I cannot think of any further explanation that already stated:
Comment 5 David Watford 2022-05-03 10:36:32 UTC Comment hidden (obsolete)
Comment 6 David Watford 2022-05-03 10:41:21 UTC
The problem still exists on latest versions 7.2.6 & 7.3.2.
I cannot think of any further explanation than that already stated:
     Clicking the Date Dropdown causes the "When losing Focus Event"
It should just show the calendar with the "When losing Focus Event"
The "When losing Focus Event" should only occur when the Date Dropdown actually 'Looses Focus'.
Comment 7 raal 2022-10-08 15:32:53 UTC
Please make test file and provide steps to reproduce. Date dropdown is probably some content control, but I don't know which one. For easy reproduction add some trivial macro (msgbox for example) to When losing Focus event. Thank you
Comment 8 David Watford 2022-10-13 19:40:45 UTC
Created attachment 183022 [details]
A sheet re-explaining the problem & a Dialog to show the problem.

This is continuation of the problem when running a Date Field with a 'When loosing Focus' event set.
That event should only occur when actually exiting the date field not when clicking the Dropdown! 
See previous comments to see when the LibreOffice version change caused me to
have to amend some programs!
Regards,
David Watford
Comment 9 QA Administrators 2022-10-14 03:33:46 UTC Comment hidden (obsolete)
Comment 10 Buovjaga 2023-02-21 09:26:11 UTC
(In reply to David Watford from comment #8)
> Created attachment 183022 [details]
> A sheet re-explaining the problem & a Dialog to show the problem.

Steps:

1. Click the button "Run date field examples"
2. Click the second dropdown

Bad result is when "Date Field 2 Exited!" immediately appears in the field below.

Bibisected with linux-64-7.1 to bafd50ee06d982e19d54fae0f9d8f968a2dedbd4
Comment 11 Caolán McNamara 2023-02-21 13:37:19 UTC
Prior to the change the dropdown did't allow keyboard access and it not was possible to use tab to cycle through the components of the dropdown so it was inaccessible (It was also the case that clicking on the Month name would show a sub menu which triggered this loss of focus then as well). Putting focus into the dropdown automatically has advantages, but triggers that the edit has lost focus to the dropdown so listeners get told the control lost focus.

I can see the desire for the use case here for the focus to be seen as not leaving the control. Maybe we can consider the Calendar components of Edit and its Dropdown as one compound control
Comment 12 Commit Notification 2023-02-21 19:56:41 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/87d756f3f5dfb55ee9edbcd5349f8107ee5945eb

tdf#142783 consider the Calendar Edit and DropDown as one compound control

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Caolán McNamara 2023-02-21 19:58:55 UTC
seems to work for trunk, backport to 7-5 in gerrit
Comment 14 Commit Notification 2023-02-22 06:06:36 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/73d02cde39d964aae9beebfc4dca5891dc5814f0

tdf#142783 consider the Calendar Edit and DropDown as one compound control

It will be available in 7.5.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Buovjaga 2023-02-23 10:10:16 UTC
Verified, thanks

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e4fb37353e2f9f998c028319c5fa083bf3eaa4cc
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded