summaryrefslogtreecommitdiff
path: root/scene/gui/dialogs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/dialogs.cpp')
-rw-r--r--scene/gui/dialogs.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index e3744eedca..be57ca9084 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -93,6 +93,9 @@ void AcceptDialog::_notification(int p_what) {
}
void AcceptDialog::_text_submitted(const String &p_text) {
+ if (get_ok_button() && get_ok_button()->is_disabled()) {
+ return; // Do not allow submission if OK button is disabled.
+ }
_ok_pressed();
}