Created
September 22, 2016 18:11
-
-
Save tedbow/3c9134d434a0c810b12a08ff29d76f36 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/modules/outside_in/js/offcanvas.js b/core/modules/outside_in/js/offcanvas.js | |
index b3c4237..9522f03 100644 | |
--- a/core/modules/outside_in/js/offcanvas.js | |
+++ b/core/modules/outside_in/js/offcanvas.js | |
@@ -106,6 +106,7 @@ | |
$element.dialog('widget').attr('data-offset-' + edge, ''); | |
+ $element.closest('[role="dialog"]').wrap('<div class="offcanvas-wrapper"></div>'); | |
$(window) | |
.on('resize.outsidein scroll.outsidein', eventData, debounce(resetSize, 100)) | |
.trigger('resize.outsidein'); | |
@@ -119,6 +120,7 @@ | |
at: edge + ' top', | |
of: window | |
}; | |
+ | |
settings.dialogClass = 'ui-dialog-offcanvas'; | |
} | |
}, | |
@@ -128,6 +130,11 @@ | |
$(window).off('.outsidein'); | |
$mainCanvasWrapper.css('padding-' + edge, 0); | |
} | |
+ }, | |
+ 'dialog:afterclose': function (event, dialog, $element) { | |
+ if ($element.is('#drupal-offcanvas')) { | |
+ $('.offcanvas-wrapper').remove(); | |
+ } | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment