From d9be78e98284e02e2232aa8bce800ae600a6ddaa Mon Sep 17 00:00:00 2001 From: Djamil Legato Date: Sun, 3 May 2015 08:46:56 -0700 Subject: [PATCH] Do not detach Mutation event if the mobileContainer doesn't exist, there might be other particles rendered (fixes #172) --- assets/common/application/offcanvas/index.js | 6 ------ assets/common/js/main.js | 6 ------ 2 files changed, 12 deletions(-) diff --git a/assets/common/application/offcanvas/index.js b/assets/common/application/offcanvas/index.js index b86505f61..49d3363f1 100644 --- a/assets/common/application/offcanvas/index.js +++ b/assets/common/application/offcanvas/index.js @@ -340,12 +340,6 @@ var Offcanvas = new prime({ mobileContainer = $('#g-mobilemenu-container'), blocks; - // if there is no mobile menu there's no need to check the offcanvas mutation - if (!mobileContainer) { - this.detachMutationEvent(); - return; - } - if (!togglers || (mutator && ((mutator.target || mutator.srcElement) !== mobileContainer[0]))) { return; } if (this.opened) { this.close(); } diff --git a/assets/common/js/main.js b/assets/common/js/main.js index 3add160a2..930eedc4c 100644 --- a/assets/common/js/main.js +++ b/assets/common/js/main.js @@ -640,12 +640,6 @@ var Offcanvas = new prime({ mobileContainer = $('#g-mobilemenu-container'), blocks; - // if there is no mobile menu there's no need to check the offcanvas mutation - if (!mobileContainer) { - this.detachMutationEvent(); - return; - } - if (!togglers || (mutator && ((mutator.target || mutator.srcElement) !== mobileContainer[0]))) { return; } if (this.opened) { this.close(); }