← All changes
|
vendor/ayecode/wp-ayecode-ui/includes/inc/bs4-js.php
+1
-1
1.2.74
→
1.2.76
View file →
| @@ -139,9 +139,9 @@ | ||
| 139 | 139 | var select2Args, select2Locale = aui_select2_locale(); |
| 140 | 140 | jQuery("select.aui-select2").each(function() { |
| 141 | 141 | if (!jQuery(this).hasClass("select2-hidden-accessible")) { |
| 142 | 142 | select2Args = jQuery.extend({}, select2Locale); |
| 143 | - if (jQuery(this).closest('.modal.show').length) { | |
| 143 | + if (jQuery(this).closest('.modal.show').length && jQuery(this).closest('.modal-body').length) { | |
| 144 | 144 | // Keep the dropdown inside the modal to prevent focus trapping. |
| 145 | 145 | select2Args.dropdownParent = jQuery(this).closest('.modal-body'); |
| 146 | 146 | } |
| 147 | 147 | jQuery(this).select2(select2Args); |