Unexpected behavior of the Exclusive property in the Popup class #4081
Labels
area:class reference
Issues and PRs about the class reference, which should be addressed on the Godot engine repository
Godot version:
3.2 Branch, commit godotengine/godot#40914
OS/device including version:
OpenGL ES 3.0 Renderer: GeForce GTX 1050 Ti/PCIe/SSE2
Issue description:
I was creating a FileDialog and I wanted to force the user to select a file. I set the Exclusive property on the Popup class to true. However, this only ensures the Popup not to hide when clicking outside the Popup window. The Popup window still closes when pressing X or the cancel button, despite the documentation stating:
If true, the popup will not be hidden when a click event occurs outside of it, or when it receives the ui_cancel action event.
So I suggest changing the documentation to better explain this behavior or to change this behavior.
Steps to reproduce:
Add a child to a Control Node that is a WindowDialog named Popup, sets its Exclusive property to activated and add a script to the parent with this code:
Then, when executing the project, it is possible to close the WindowDialog when pressing X.
Minimal reproduction project:
Dialog.zip
The text was updated successfully, but these errors were encountered: