From: SassNinja Date: Tue, 13 Jun 2017 06:41:19 +0000 (+0200) Subject: Undo the wrapper inner fix X-Git-Tag: v6.4.0-rc5~9^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56996cebf8c137b00217ce3a60e9e6579eefd9e3;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Undo the wrapper inner fix Since wrapper inner is deprecated and erroneously implemented in the docs, I'm undoing my fix. Once the docs got fixed, the push transition is going to work as expected. --- diff --git a/js/foundation.offcanvas.js b/js/foundation.offcanvas.js index 5586436ad..23d6ad8de 100644 --- a/js/foundation.offcanvas.js +++ b/js/foundation.offcanvas.js @@ -30,7 +30,6 @@ class OffCanvas extends Plugin { this.$lastTrigger = $(); this.$triggers = $(); this.position = 'left'; - this.$wrapperInner = $(); // prior v6.3 this.$content = $(); this.nested = !!(this.options.nested); @@ -56,29 +55,18 @@ class OffCanvas extends Plugin { this.$element.attr('aria-hidden', 'true'); - this.$wrapperInner = this.$element.parent('[data-off-canvas-wrapper]'); // prior v6.3 - // Find off-canvas content, either by ID (if specified), by siblings or by closest selector (fallback) if (this.options.contentId) { this.$content = $('#'+this.options.contentId); } else if (this.$element.siblings('[data-off-canvas-content]').length) { this.$content = this.$element.siblings('[data-off-canvas-content]').first(); - } else if (this.$wrapperInner.length && this.$wrapperInner.siblings('[data-off-canvas-content]').length) { - this.$content = this.$wrapperInner.siblings('[data-off-canvas-content]').first(); } else { this.$content = this.$element.closest('[data-off-canvas-content]').first(); } if (!this.options.contentId) { - - - if (this.$wrapperInner.length && this.$wrapperInner.siblings('[data-off-canvas-content]').length) { - // If using off-canvas wrapper inner (prior v6.3), assume that the off-canvas element is not nested if the wrapper is a sibling of the content - this.nested = false; - } else { - // Assume that the off-canvas element is nested if it isn't a sibling of the content - this.nested = this.$element.siblings('[data-off-canvas-content]').length === 0; - } + // Assume that the off-canvas element is nested if it isn't a sibling of the content + this.nested = this.$element.siblings('[data-off-canvas-content]').length === 0; } else if (this.options.contentId && this.options.nested === null) { // Warning if using content ID without setting the nested option