← All changes
|
vendor/ayecode/wp-ayecode-ui/includes/inc/bs5-js.php
+1
-1
1.2.73
→
1.2.77
View file →
| @@ -156,9 +156,9 @@ | ||
| 156 | 156 | var select2Args, select2Locale = aui_select2_locale(); |
| 157 | 157 | jQuery("select.aui-select2").each(function() { |
| 158 | 158 | if (!jQuery(this).hasClass("select2-hidden-accessible")) { |
| 159 | 159 | select2Args = jQuery.extend({}, select2Locale); |
| 160 | - if (jQuery(this).closest('.modal.show').length) { | |
| 160 | + if (jQuery(this).closest('.modal.show').length && jQuery(this).closest('.modal-body').length) { | |
| 161 | 161 | // Keep the dropdown inside the modal to prevent focus trapping. |
| 162 | 162 | select2Args.dropdownParent = jQuery(this).closest('.modal-body'); |
| 163 | 163 | } |
| 164 | 164 | jQuery(this).select2(select2Args); |