Skip to content

Commit

Permalink
XWIKI-22492: Livedata filter options are misread (#3808)
Browse files Browse the repository at this point in the history
* Removed the problematic semantics from the selectize options.
  • Loading branch information
Sereza7 authored Jan 20, 2025
1 parent 83a9cbf commit 845db18
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ define('xwiki-selectize', [
'xwiki-events-bridge'
], function($, Selectize, l10n) {
var optionTemplate = [
'<div class="xwiki-selectize-option" role="option" aria-selected="false" data-value="">',
'<div class="xwiki-selectize-option" data-value="">',
'<span class="xwiki-selectize-option-icon"></span>',
'<span class="xwiki-selectize-option-label"></span>',
'</div>'
Expand Down Expand Up @@ -206,10 +206,6 @@ define('xwiki-selectize', [
let oldOnOptionSelect = this.selectize.onOptionSelect;
this.selectize.onOptionSelect = function(...args) {
const result = oldOnOptionSelect.apply(this, args);
// clear aria-selected state on all previously selected elements first
this.get$('dropdown').find('.option').attr('aria-selected','false');
// then set the aria-selected state of the newly selected element.
this.get$('dropdown').find('.selected').attr('aria-selected','true');
return result;
}
let oldSetActiveOption = this.selectize.setActiveOption;
Expand Down

0 comments on commit 845db18

Please sign in to comment.