RFR: 8284654: Modal behavior returns to wrong stage

Ambarish Rapte arapte at openjdk.java.net
Thu May 5 13:50:31 UTC 2022


On Fri, 22 Apr 2022 19:26:36 GMT, Thiago Milczarek Sayao <tsayao at openjdk.org> wrote:

> When there's an APPLICATION_MODAL window, all other windows are disabled and re-enabled when the APPLICATION_MODAL window closes. This causes `requestToFront()` to be called on every window, and it does not guarantee order.
> 
> The fix also works for:
> https://bugs.openjdk.java.net/browse/JDK-8269429
> 
> But this one might need another fix:
> https://bugs.openjdk.java.net/browse/JDK-8240640

This change fixes the exact issue that is reported in [JDK-8284654](https://bugs.openjdk.java.net/browse/JDK-8284654).

But I observed another issue that occurs with this change.
Steps:
1. Run the sample attached to [JDK-8284654](https://bugs.openjdk.java.net/browse/JDK-8284654).
2. Click button One and Two both once
3. Re-arrange both the windows such that they are visible.
4. Click the button "Click here" in Window Two: Error dialog will be displayed
5. Click anywhere in Window One
6. Close the Error dialog
 => Observe that Window One gets the focus and not Window Two.

I think the expected behavior here should be: After closing a dialog the Focus should return to its parent window.

-------------

PR: https://git.openjdk.java.net/jfx/pull/784


More information about the openjfx-dev mailing list