From 4b07a2bfb46cbfba4b83ace38632b9b876fd77df Mon Sep 17 00:00:00 2001 From: jlukic Date: Mon, 11 May 2015 12:00:32 -0400 Subject: [PATCH] Only set scroll position on selection dropdown, unnecessary tabindex --- src/definitions/modules/dropdown.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index 8a7000d57..10d9e0775 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -1631,24 +1631,18 @@ $.fn.dropdown = function(parameters) { }, tabbable: function() { if( module.has.search() ) { - module.debug('Searchable dropdown initialized'); + module.debug('Added tabindex to searchable dropdown'); $search .val('') .attr('tabindex', 0) ; - $menu - .attr('tabindex', '-1') - ; } else { - module.debug('Simple selection dropdown initialized'); + module.debug('Added tabindex to dropdown'); if(!$module.attr('tabindex') ) { $module .attr('tabindex', 0) ; - $menu - .attr('tabindex', '-1') - ; } } }, @@ -2320,7 +2314,9 @@ $.fn.dropdown = function(parameters) { ? callback : function(){} ; - module.set.scrollPosition(module.get.selectedItem(), true); + if(module.is.selection()) { + module.set.scrollPosition(module.get.selectedItem(), true); + } module.verbose('Doing menu show animation', $currentMenu); if( module.is.hidden($currentMenu) || module.is.animating($currentMenu) ) {