Browse Source

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

pull/7142/head
Abhinav 10 months ago
parent
commit
c8f42b3250
1 changed files with 10 additions and 13 deletions
  1. 23
      src/definitions/modules/dropdown.js

23
src/definitions/modules/dropdown.js

@ -2259,28 +2259,25 @@ $.fn.dropdown = function(parameters) {
$text.addClass(className.placeholder);
},
tabbable: function() {
if( module.is.searchSelection() ) {
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', 0)
;
.attr('tabindex', selectTabIndex !== undefined ? selectTabIndex : 0); // Use the captured tabindex
$menu
.attr('tabindex', -1)
;
}
else {
.attr('tabindex', -1);
} else {
module.debug('Added tabindex to dropdown');
if( $module.attr('tabindex') === undefined) {
if ($module.attr('tabindex') === undefined) {
$module
.attr('tabindex', 0)
;
.attr('tabindex', selectTabIndex !== undefined ? selectTabIndex : 0); // Use the captured tabindex
$menu
.attr('tabindex', -1)
;
.attr('tabindex', -1);
}
}
},
}
,
initialLoad: function() {
module.verbose('Setting initial load');
initialLoad = true;

Loading…
Cancel
Save