From 1a96e7f9e737941480436269668ccde0a50395f9 Mon Sep 17 00:00:00 2001 From: Pavel Vomacka Date: Feb 17 2017 16:50:32 +0000 Subject: WebUI: add default on_cancel function in adder_dialog Adder dialog is mixed with confirmation_mixin. That mixin calls on_cancel method when closing dialog using ESC key. Previously the on_cancel method was not defined, therefore dialog was not correctly closed. This was the root cause of the bug, that adder dialog cannot be opened after closing it using ESC. Now the default function for on_cancel is dialog.close. So dialog is correctly closed. https://fedorahosted.org/freeipa/ticket/6388 Reviewed-By: Petr Vobornik Reviewed-By: Martin Basti --- diff --git a/install/ui/src/freeipa/add.js b/install/ui/src/freeipa/add.js index 6221085..b93bd34 100644 --- a/install/ui/src/freeipa/add.js +++ b/install/ui/src/freeipa/add.js @@ -36,6 +36,8 @@ IPA.entity_adder_dialog = function(spec) { var that = IPA.dialog(spec); + that.on_cancel = that.close; + IPA.confirm_mixin().apply(that); /** @property {string} method="add" API method for add command */