diff --git a/js/layout-paragraphs-widget.js b/js/layout-paragraphs-widget.js index 332cfa0730e8c491d81c492384ecb98ea3500d62..2eb0ba67401cf2965592745da9c149c3d1fd67c8 100644 --- a/js/layout-paragraphs-widget.js +++ b/js/layout-paragraphs-widget.js @@ -965,4 +965,19 @@ } }, 50); }; + + // Enables interactions with anything outside of the current CKeditor dialog + // @see Table Element issue https://www.drupal.org/project/layout_paragraphs/issues/3196477 + Drupal.behaviors.allowChildDialogInteraction = { + attach: function attach() { + let 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);