]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
fix: add reflow option in reflow to limit responsive accordion tabs fix 11885/head
authorSassNinja <kai.falkowski@gmail.com>
Thu, 24 Oct 2019 15:28:15 +0000 (17:28 +0200)
committerSassNinja <kai.falkowski@gmail.com>
Thu, 24 Oct 2019 15:28:15 +0000 (17:28 +0200)
Without this adjustment the constructor of ResponsiveAccordionTabs always returns the transformed plugin (Accordion/Tab) and not ResponsiveAccordionTabs.

This behavior is mostly only needed if the plugin gets initialized automatically.
Otherwise all own methods of that plugin don't make much sense.

js/foundation.core.js
js/foundation.responsiveAccordionTabs.js

index 8b7b88abe4aefe678ead3d307c9da8c02416ec0d..18ceef959f05e509509cfc70567dbab74ce66b41 100644 (file)
@@ -156,8 +156,8 @@ var Foundation = {
       // For each plugin found, initialize it
       $elem.each(function() {
         var $el = $(this),
-            opts = {};
-            
+            opts = { reflow: true };
+
         if($el.attr('data-options')){
           var thing = $el.attr('data-options').split(';').forEach(function(e, i){
             var opt = e.split(':').map(function(el){ return el.trim(); });
index 448cc72dec0c12885278b0864133c58c05956046..0233d9f89bea171492b6eb4b30f3bccdb410a2e1 100644 (file)
@@ -38,7 +38,7 @@ var MenuPlugins = {
 class ResponsiveAccordionTabs extends Plugin{
   constructor(element, options) {
     super(element, options);
-    return this.storezfData || this;
+    return this.options.reflow && this.storezfData || this;
   }
 
   /**