godotengine / godotengine/godot-docs
Unexpected behavior of the Exclusive property in the Popup class
- Dominant language
- reStructuredText
- Stars
- 5.7k
- Forks
- 3.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
Description
**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:
```
extends Control
func _ready():
get_node("Popup").popup_centered()
```
Then, when executing the project, it is possible to close the WindowDialog when pressing X.
**Minimal reproduction project:**
[Dialog.zip](https://github.com/godotengine/godot/files/5027293/Dialog.zip)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.