Closed ScottHamper closed 1 year ago
This sounds like it's been fixed by https://github.com/JetBrains/compose-multiplatform-core/pull/863
Please try it in Compose 1.5.10-rc01
Yes! The issue no longer occurs in 1.5.10-rc01
. Sorry for the extraneous issue, but thanks for your time!
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
Describe the bug When using a composable function that abstracts around
AwtWindow
/FileDialog
and accepts a parameter for theFileDialog
parent, any composition changes in the parentWindow
seem to cause theFileDialog
to close (viasetVisible(false)
).Affected platforms Select one of the platforms below:
Versions
To Reproduce
Expected behavior The
FileDialog
remains open while the main window behind it recomposes to display the updatedcount
value.Screenshots
Additional context Any one of a few small tweaks to the code can prevent the bug from occurring. Each of these can be done independently of each other to work around the issue:
count
(comment out theText
component displaying its value).FileDialog
composable function and inline its body where it is used in the mainWindow
's content.null as Frame?
to thejava.awt.FileDialog
constructor.I've also set up a number of print statements to trace order of execution. Here's the output for a sample run: