assets/javascripts/semantic_ui/definitions/modules/dropdown.js in less-rails-semantic_ui-1.11.1.0 vs assets/javascripts/semantic_ui/definitions/modules/dropdown.js in less-rails-semantic_ui-1.11.4.0

- old
+ new

@@ -29,11 +29,11 @@ queryArguments = [].slice.call(arguments, 1), returnedValue ; $allModules - .each(function() { + .each(function(index) { var settings = ( $.isPlainObject(parameters) ) ? $.extend(true, {}, $.fn.dropdown.settings, parameters) : $.extend({}, $.fn.dropdown.settings), @@ -208,20 +208,19 @@ $input .removeAttr('class') .prependTo($module) ; } - module.refresh(); + module.setup.reference(); }, reference: function() { var - index = $allModules.index($module), $firstModules, $lastModules ; module.debug('Dropdown behavior was called on select, replacing with closest dropdown'); // replace module reference - $module = $module.parent(selector.dropdown); + $module = $module.closest(selector.dropdown); module.refresh(); // adjust all modules $firstModules = $allModules.slice(0, index); $lastModules = $allModules.slice(index + 1); $allModules = $firstModules.add($module).add($lastModules);