diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/js/layout-builder-fix-modals.js b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/js/layout-builder-fix-modals.js new file mode 100644 index 0000000000..8c12e214fa --- /dev/null +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/js/layout-builder-fix-modals.js @@ -0,0 +1,10 @@ +(function ($, Drupal) { + orig_allowInteraction = $.ui.dialog.prototype._allowInteraction; + $.ui.dialog.prototype._allowInteraction = function(event) { + if ($(event.target).closest('.cke_dialog').length) { + return true; + } + return orig_allowInteraction.apply(this, arguments); + }; + +})(jQuery, Drupal); diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.libraries.yml b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.libraries.yml index aa57d81a7c..802ce73c3b 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.libraries.yml +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.libraries.yml @@ -3,6 +3,8 @@ node_layout_form: theme: css/layout-builder-browser.css: {} css/multifield-form.css: { } + js: + js/layout-builder-fix-modals.js: { attributes: { defer: true } } taxonomy_form: css: theme: