diff -u b/core/modules/outside_in/js/offcanvas.js b/core/modules/outside_in/js/offcanvas.js --- b/core/modules/outside_in/js/offcanvas.js +++ b/core/modules/outside_in/js/offcanvas.js @@ -9,23 +9,27 @@ /** * Create a wrapper container for the off canvas element. + * * @param {number} pageWidth * The width of #page-wrapper. + * * @return {object} * jQuery object that is the off canvas wrapper element. */ var createOffCanvasWrapper = function (pageWidth) { - return $('
', { - 'id': 'offcanvas', - 'role': 'region', - 'aria-labelledby': 'offcanvas-header' - }); - }; + return $('
', { + 'id': 'offcanvas', + 'role': 'region', + 'aria-labelledby': 'offcanvas-header' + }); + }; /** * Create the title element for the off canvas element. + * * @param {string} title * The title string. + * * @return {object} * jQuery object that is the off canvas title element. */ @@ -35,8 +39,10 @@ /** * Create the actual off canvas content. + * * @param {string} data - * This is fully rendered html from Drupal. + * This is fully rendered HTML from Drupal. + * * @return {object} * jQuery object that is the off canvas content element. */ @@ -46,11 +52,13 @@ /** * Create the off canvas close element. - * @param {object} offCanvasWrapper + * + * @param {object} offCanvasWrapper * The jQuery off canvas wrapper element - * @param {object} pageWrapper + * @param {object} pageWrapper * The jQuery off page wrapper element - * @return {object} + * + * @return {jQuery} * jQuery object that is the off canvas close element. */ var createOffCanvasClose = function (offCanvasWrapper, pageWrapper) { @@ -58,7 +66,7 @@ 'class': 'offcanvasClose', 'aria-label': Drupal.t('Close configuration tray.'), 'html': '' + Drupal.t('Close') + '' - }).click(function () { + }).on('click', function () { pageWrapper .removeClass('js-tray-open') .one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function () { @@ -78,6 +86,7 @@ * The Drupal Ajax object. * @param {object} response * Object holding the server response. + * * @param {number} [status] * The HTTP status code. */ @@ -120,7 +129,7 @@ else { Drupal.announce(Drupal.t('Configuration tray opened.')); } - Drupal.attachBehaviors(document.querySelector('#offcanvas'),drupalSettings); + Drupal.attachBehaviors(document.querySelector('#offcanvas'), drupalSettings); }; })(jQuery, Drupal); diff -u b/core/modules/outside_in/js/outside_in.js b/core/modules/outside_in/js/outside_in.js --- b/core/modules/outside_in/js/outside_in.js +++ b/core/modules/outside_in/js/outside_in.js @@ -10,7 +10,7 @@ // Bind a listener to the 'edit' button // Toggle the js-outside-edit-mode class on items that we want // to disable while in edit mode. - $('div.contextual-toolbar-tab.toolbar-tab button').click(function () { + $('.contextual-toolbar-tab.toolbar-tab button').on('click', function () { setToggleActiveMode(); }); @@ -26,7 +26,7 @@ // When a click occurs try and find the outside-in edit link // and click it. .not('div.contextual a, div.contextual button') - .click(function (e) { + .on('click', function (e) { if ($(e.target.offsetParent).hasClass('contextual')) { return; } @@ -79,7 +79,7 @@ // Bind a listener to all 'Quick Edit' links for blocks // Click "Edit" button in toolbar to force Contextual Edit which starts // Outside In edit mode also. - data.$el.find('.outside-inblock-configure a').click(function () { + data.$el.find('.outside-inblock-configure a').on('click', function () { if (!isActiveMode()) { $('div.contextual-toolbar-tab.toolbar-tab button').click(); } @@ -89,7 +89,7 @@ /** * Gets all items that should be toggled with class during edit mode. * - * @returns {*} + * @return {*} * Items that should be toggled. */ var getItemsToToggle = function () {