diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml
index 0446f6d73f6..450cf372835 100644
--- a/doc/classes/Window.xml
+++ b/doc/classes/Window.xml
@@ -626,7 +626,6 @@
If [code]true[/code], the [Window] will be considered a popup. Popups are sub-windows that don't show as separate windows in system's window manager's window list and will send close request when anything is clicked outside of them (unless [member exclusive] is enabled).
- [b]Note:[/b] This property only works with native windows.
The window's position in pixels.
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index 0860bf39682..4360c48a38f 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -45,7 +45,7 @@ void AcceptDialog::_input_from_window(const Ref &p_event) {
}
void AcceptDialog::_parent_focused() {
- if (close_on_escape && !is_exclusive()) {
+ if (!is_exclusive() && get_flag(FLAG_POPUP)) {
_cancel_pressed();
}
}