Semantic-Org / Semantic-UI

Semantic is a UI component framework based around useful principles from natural language.
http://www.semantic-ui.com
MIT License
51.07k stars 4.96k forks source link

Fixed issue #7100 : [Dropdown] - allowTab tabindex value should default to select's tabindex (if exists) #7100 #7142

Open igABHINAV opened 2 weeks ago

igABHINAV commented 2 weeks ago

updated code : tabbable: function() { var selectTabIndex = $module.attr('tabindex'); // Capture the tabindex from the select element if (module.is.searchSelection()) { module.debug('Added tabindex to searchable dropdown'); $search .val('') .attr('tabindex', selectTabIndex !== undefined ? selectTabIndex : 0); // Use the captured tabindex $menu .attr('tabindex', -1); } else { module.debug('Added tabindex to dropdown'); if ($module.attr('tabindex') === undefined) { $module .attr('tabindex', selectTabIndex !== undefined ? selectTabIndex : 0); // Use the captured tabindex $menu .attr('tabindex', -1); } } }