PB 2021 - build 1506. I am posting this issue to Q&A so others are aware of it but I am also submitting this as a bug.
We have been trying to reproduce this issue consistently - it seems to happen frequently within our main application and only occasionally with a test bed application. Basically if we open a userobject on a window containing a webbrowser and then close it , it will sometimes fire a close event on the parent application! This is intermittent enough to be very annoying. It is not Themes related. It is not related to navigation (it still occurs if we do not navigate) The issue occurs in both the compiled application and the IDE.
I have found that it does seem to consistently occur if I close the IDE and then reopen and immediately launch the test bed application. I will report this as a bug since it seems it can be recreated by closing the IDE and reopening...
Here is our testbed code.
We have an instance variable on the window like this:
webbrowser i_webbrowser
And two buttons on the window.
[Open Webbrowser] with the code:
parent.openuserobject(i_webbrowser)
i_webbrowser.visible=TRUE
i_webbrowser.x=500
i_webbrowser.y=500
i_webbrowser.width=1000
i_webbrowser.height=1000
i_webbrowser.navigate("http://www.appeon.com")
And [Close Webbrowser] with the code:
parent.closeuserobject(i_webbrowser)
Open the window, click the open Web Browser button. The Appeon web page appears. Hit the close Web Browser button and then the entire application closes.