diff --git a/core/modules/outside_in/js/off-canvas.es6.js b/core/modules/outside_in/js/off-canvas.es6.js index 507c4fe3d2..99077ec98f 100644 --- a/core/modules/outside_in/js/off-canvas.es6.js +++ b/core/modules/outside_in/js/off-canvas.es6.js @@ -134,8 +134,8 @@ $element.css({ height: 'auto' }); const modalHeight = $container.height(); - $offsets.each(($offset) => { - offset += $($offset).outerHeight(); + $offsets.each((i, e) => { + offset += $(e).outerHeight(); }); // Take internal padding into account. diff --git a/core/modules/outside_in/js/off-canvas.js b/core/modules/outside_in/js/off-canvas.js index 54e4e54c50..b9ec223d12 100644 --- a/core/modules/outside_in/js/off-canvas.js +++ b/core/modules/outside_in/js/off-canvas.js @@ -10,6 +10,7 @@ minDisplaceWidth: 768, $mainCanvasWrapper: $('[data-off-canvas-main-canvas]'), + isOffCanvas: function isOffCanvas($element) { return $element.is('#drupal-off-canvas'); }, @@ -54,8 +55,8 @@ $element.css({ height: 'auto' }); var modalHeight = $container.height(); - $offsets.each(function ($offset) { - offset += $($offset).outerHeight(); + $offsets.each(function (i, e) { + offset += $(e).outerHeight(); }); var scrollOffset = $element.outerHeight() - $element.height();