diff --git a/core/modules/outside_in/js/off-canvas.es6.js b/core/modules/outside_in/js/off-canvas.es6.js index 1a162559a4..507c4fe3d2 100644 --- a/core/modules/outside_in/js/off-canvas.es6.js +++ b/core/modules/outside_in/js/off-canvas.es6.js @@ -11,12 +11,12 @@ (($, Drupal, debounce, displace) => { /** - * Attaches off-canvas dialog behaviors. + * Off-canvas dialog implementation using jQuery Dialog. * - * @type {Drupal~behavior} + * Transforms the regular dialogs created using Drupal.dialog when the dialog + * element equals '#drupal-off-canvas' into an side-loading dialog. * - * @prop {Drupal~behaviorAttach} attach - * Attaches event listeners for off-canvas dialogs. + * @namespace */ Drupal.offCanvas = { @@ -61,8 +61,10 @@ of: window, }; - // Applies initial height to dialog based on window height. - // See http://api.jqueryui.com/dialog for all dialog options. + /** + * Applies initial height to dialog based on window height. + * @see http://api.jqueryui.com/dialog for all dialog options. + */ settings.height = $(window).height(); }, @@ -222,6 +224,14 @@ }, }; + /** + * Attaches off-canvas dialog behaviors. + * + * @type {Drupal~behavior} + * + * @prop {Drupal~behaviorAttach} attach + * Attaches event listeners for off-canvas dialogs. + */ Drupal.behaviors.offCanvasEvents = { attach: () => { $(window).once('off-canvas').on({