mirror of https://github.com/go-gitea/gitea.git
Fix JS error for "select" dropdown (#34743)
Regression of recent dropdown filter change.pull/34745/head^2
parent
439ebe7031
commit
4cbb482554
|
|
@ -72,10 +72,10 @@ function updateSelectionLabel(label: HTMLElement) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onAfterFiltered(this: any) {
|
function onAfterFiltered(this: any) {
|
||||||
const $dropdown = $(this);
|
const $dropdown = $(this).closest('.ui.dropdown'); // "this" can be the "ui dropdown" or "<select>"
|
||||||
const hideEmptyDividers = $dropdown.dropdown('setting', 'hideDividers') === 'empty';
|
const hideEmptyDividers = $dropdown.dropdown('setting', 'hideDividers') === 'empty';
|
||||||
const itemsMenu = $dropdown[0].querySelector('.scrolling.menu') || $dropdown[0].querySelector('.menu');
|
const itemsMenu = $dropdown[0].querySelector('.scrolling.menu') || $dropdown[0].querySelector('.menu');
|
||||||
if (hideEmptyDividers) hideScopedEmptyDividers(itemsMenu);
|
if (hideEmptyDividers && itemsMenu) hideScopedEmptyDividers(itemsMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
// delegate the dropdown's template functions and callback functions to add aria attributes.
|
// delegate the dropdown's template functions and callback functions to add aria attributes.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue