Issue #2811717 by tedbow, drpal, RajabNatshah, droplet, alexpott: [outsidein] Uncaught TypeError: Cannot read property 'addEventListener' of null

8.4.x
Lauri Eskola 2017-05-06 08:19:18 +03:00
parent 5380355d5a
commit e67f64e52f
2 changed files with 6 additions and 1 deletions

View File

@ -124,6 +124,9 @@
* True enable edit mode, false disable edit mode.
*/
function setEditModeState(editMode) {
if (!document.querySelector('[data-off-canvas-main-canvas]')) {
throw new Error('data-off-canvas-main-canvas is missing from outside-in-page-wrapper.html.twig');
}
editMode = !!editMode;
var $editButton = $(toggleEditSelector);
var $editables;

View File

@ -3,7 +3,9 @@
* @file
* Default theme implementation for a page wrapper.
*
* For consistent wrapping to {{ page }} render in all themes.
* For consistent wrapping to {{ page }} render in all themes. The
* "data-off-canvas-main-canvas" attribute is required by the off-canvas dialog.
* It cannot be removed without breaking the off-canvas dialog functionality.
*
* Available variables:
* - children: Contains the child elements of the page.