diff --git a/js/modal.js b/js/modal.js index 831649f..daf060f 100644 --- a/js/modal.js +++ b/js/modal.js @@ -282,7 +282,10 @@ // content. This is helpful for allowing users to see error messages at the // top of a form, etc. $('#modal-content').html(response.output).scrollTop(0); - Drupal.attachBehaviors(); + + // Attach behaviors within a modal dialog. + var settings = response.settings || ajax.settings || Drupal.settings; + Drupal.attachBehaviors('#modalContent', settings); } /**