From 2d74c2c0be3593ee24b5f707e6c195ca7c400152 Mon Sep 17 00:00:00 2001 From: Calvo Date: Mon, 28 Jun 2021 14:16:30 +0200 Subject: [PATCH] Fix select2 write search field on dialog --- pandora_console/include/functions_register.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_register.php b/pandora_console/include/functions_register.php index b0f88881fa..82c94441e7 100644 --- a/pandora_console/include/functions_register.php +++ b/pandora_console/include/functions_register.php @@ -264,7 +264,19 @@ function show_configuration_wizard() { background: "black" }, closeOnEscape: false, - open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); } + open: function(event, ui) { + $(".ui-dialog-titlebar-close").hide(); + if ($.ui && $.ui.dialog && $.ui.dialog.prototype._allowInteraction) { + var ui_dialog_interaction = $.ui.dialog.prototype._allowInteraction; + $.ui.dialog.prototype._allowInteraction = function(e) { + if ($(e.target).closest('.select2-dropdown').length) return true; + return ui_dialog_interaction.apply(this, arguments); + }; + } + }, + _allowInteraction: function (event) { + return !!$(event.target).is(".select2-input") || this._super(event); + } }); default_language_displayed = $("#language").val();