diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index a558d97569f..856d7cdfbd1 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -386,11 +386,10 @@ function ajax_autoselect($htmlname, $addlink='') * @param int $minLengthToAutocomplete Minimum length of input string to start autocomplete * @param int $forcefocus Force focus on field * @param string $widthTypeOfAutocomplete 'resolve' or 'off' - * @param string $modalid ID of modal (for avoid focus problem when select2 is in a modal dialog window) * @return string Return html string to convert a select field into a combo, or '' if feature has been disabled for some reason. * @see selectArrayAjax of html.form.class */ -function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0, $widthTypeOfAutocomplete='resolve', $modalid='dialog-confirm') +function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0, $widthTypeOfAutocomplete='resolve') { global $conf; @@ -427,7 +426,7 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $ escapeMarkup: function(markup) { return markup; }, - dropdownParent: $(\'#'.$modalid.'\') + dropdownCssClass: \'ui-dialog\' })'; if ($forcefocus) $msg.= '.select2(\'focus\')'; $msg.= ';'."\n";