Bug 155708 - UI: Validity dialog closes when moving focus to another Calc window
Summary: UI: Validity dialog closes when moving focus to another Calc window
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.0.0.3 release
Hardware: All All
: medium normal
Assignee: Balázs Varga (allotropia)
URL:
Whiteboard: target:24.2.0 target:7.6.0.2
Keywords: regression
Depends on:
Blocks: Cell-Validity
  Show dependency treegraph
 
Reported: 2023-06-06 14:09 UTC by Gabor Kelemen (allotropia)
Modified: 2023-07-23 18:26 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
The dialog before changing to another window (68.76 KB, image/png)
2023-06-06 14:09 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2023-06-06 14:09:38 UTC
Created attachment 187753 [details]
The dialog before changing to another window

This is a followup to bug 137215
When the Validity dialog is open and a Cell Range criteria is selected, moving the focus to another Cald document window closes the Validity dialog.

1. Open two new Calc documents
2. In one of them open Data - Validity
3. In the Allow dropdown select the Cell range option
4. Move the focus to the other document, then back to the first dialog
-> the Validity dialog is closed.

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

This started in bug 137215, before that it even froze, so not a regression per se, but it worked in 6.2.

A similar behavior in case of other dialog (among others: Conditional Formatting, Edit Print Ranges, Define Database Range, Define Name) was fixed in bug 146913 - so this can be improved.
Comment 1 ady 2023-06-21 07:44:27 UTC
This is slightly tricky to replicate. Moreover, with a minor derail from the STR, the result can be even worse (or the behavior is not replicated at all), so please follow the steps exactly. Even changing windows back and forth (e.g. to re-read the next step) within the procedure could change the resulting behavior (so probably memorizing/learning the steps beforehand would be recommended) – it took me several times for me to exactly identify the minor differences in reliable repeatable steps.


STR_A:
0. LO is closed before starting the procedure. Open Start Center.
1. Open only one new (empty) Calc window (Untitled 1).
2. [CTRL]+[N] (Untitled 2)
3. Menu Data > Validity

4. Click on "All values" of the "Allow" field.
5. Click on "Cell range" of the "Allow" field.
6. Click once inside the "Source" field.
7. Change window to "Untitled 1" (on MS Windows, [ALT]+[TAB]).
8. Change window to "Untitled 2" (on MS Windows, [ALT]+[TAB]).

*Expected* results:
The Validity dialog should still be displayed in "Untitled 2".

Actual results:
No Validity dialog is shown, not even in the back/hidden/minimized.
Note: both files can be successfully closed.


STR_B, obtaining a much worse resulting behavior:

0. LO is closed before starting the procedure. Open Start Center.
1. Open only one new (empty) Calc window (Untitled 1).
2. [CTRL]+[N] (Untitled 2)
3. Menu Data > Validity

4. Change window to "Untitled 1" (on MS Windows, [ALT]+[TAB]).
5. Change window to "Untitled 2" (on MS Windows, [ALT]+[TAB]).

6. Click on "All values" of the "Allow" field.
7. Click on "Cell range" of the "Allow" field.
8. Click once inside the "Source" field.
7. Change window to "Untitled 1" (on MS Windows, [ALT]+[TAB]).
9. Change window to "Untitled 2" (on MS Windows, [ALT]+[TAB]).

Intermediate results:
The Validity dialog is still displayed.

10. [ESC] to exit the dialog.
11. Menu File > Close (the window is still opened).
12. Open a new (empty) Writer window; it can be successfully closed.
13. Open a new (empty) Calc window; it cannot be closed.

Actual results:
Calc windows can _not_ be actually closed; they have to be forcefully closed by using Task Manager. When re-opening LO, these will be listed for recovery attempt.

While STR_B results in a different behavior than STR_A, I'm not sure they should be placed in a separate report. Considering the very minor differences in the steps, the source problem might be closely related for both.

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 098e8d6f111ca9d7680ed1eec00522fed6487e95
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (es_AR); UI: en-US
Calc: CL threaded
Built: 2023-06-21

Setting to NEW.

FWIW, Caolán McNamara solved current "See also"s bug 137215 and bug 146913.
Comment 2 ady 2023-06-22 23:00:44 UTC
For now, I am leaving aside the procedure I described in STR_B from comment 1 for future evaluation.

Following _exactly_ STR_A from comment 1:

* In LO 6.2.6.2 and older, it seems OK, but the focus is not within the Validity dialog when going back to it; I can click within the "Source" field to obtain focus.

* In LO 6.3.3.2, the Validity dialog has the focus when going back to it, but then the dialog cannot be closed, neither the file "Untitled 2" itself. The file "Untitled 1" can still be closed. I have to use Task Manager to kill LO. This would seem closely related to STR_B from comment 1.

* In LO 7.0.0.3, the frame of the Validity dialog is seen, but not its content, and it cannot be closed in any way, neither the file "Untitled 2" itself. The file "Untitled 1" can still be closed. I have to use Task Manager to kill LO.

* In LO 7.0.4.2, repro _exactly_ as in STR_A from comment 1; both files can be successfully closed.

Considering those results, I'm not sure which version would be adequate for the "Version" field for this bug 155708.
Comment 3 Commit Notification 2023-07-05 12:31:08 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a5c61b143d53bb10430b8a486874856c16a2d86c

tdf#155708 Fix validity dialog closes when moving focus to another window

It will be available in 24.2.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 4 Commit Notification 2023-07-07 12:53:43 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/efaa065eb7053954242c83760f897e7dba2e9fe8

Related: tdf#155708 Clean-up left over nCloseResponseToJustHide

It will be available in 24.2.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 5 ady 2023-07-10 22:32:16 UTC
As of:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 81726f5af5fda25f0d92ffc8458d7f24eb16f408
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (es_AR); UI: en-US
Calc: CL threaded

Following STR_B from comment 1 still fails: when escaping/canceling the Validity dialog, trying to close both spreadsheets fails and Task Manager has to be used in order to close LO.

Should this be a new independent bug report?
Comment 6 Gabor Kelemen (allotropia) 2023-07-12 23:00:39 UTC
Now I can confirm that the dialog does not disappear when changing to another Calc window (steps STR_A in comment 1).

Steps in STR_B still lead to unclosable windows - I filed it as a new one.
Comment 7 ady 2023-07-13 09:17:29 UTC
(In reply to Gabor Kelemen (allotropia) from comment #6)

> Steps in STR_B still lead to unclosable windows - I filed it as a new one.

That's bug 156263. Thank you.
Comment 8 Commit Notification 2023-07-16 18:32:41 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/1f4093d11d6d99490972d37df7e9f30e8ebc1583

tdf#155708 Fix validity dialog closes when moving focus to another window

It will be available in 7.6.0.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 9 Commit Notification 2023-07-21 16:08:26 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/396cbd8cd017f883946f1a0be7285c89f84f40af

Related: tdf#155708 Clean-up - Fix validity dialog closes

It will be available in 24.2.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 10 Commit Notification 2023-07-23 18:26:04 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/11d23a92cf15f8086e78a5fe9a6ae5d238208bbd

Related: tdf#155708 Clean-up - Fix validity dialog closes

It will be available in 7.6.0.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.