Hi everyone,
I’m encountering an issue with aui-select2
in Jira 10. For some reason, I’m unable to select any options in the dropdown. Here are some details about my setup:
- I initialize the
aui-select2
dropdown using the following JavaScript code:
AJS.toInit(function() {
AJS.$("#my-select2").auiSelect2();
})
- The dropdown is rendered correctly and displays the placeholder text.
- When I click to open the dropdown, the options are visible, but clicking an option does not select it.
- Observed Behavior:
- The dropdown opens, but selecting an option does nothing.
- No errors are visible in the browser console.
- The input value does not update with the selected option.
1 Like
Hi @DuyAnhDo,
Could you, please, provide a minimal reproducible code snippet?
Maybe there’s something transparent covering the dropdown? Does the keyboard navigation through the items work?
The sandboxed examples in AUI Select2 - AUI Documentation are working as expected.
Hi,
did you found a solution?
I have the same problem when i upgrade my addon to jira 10.4.1
Kind regards
Michael
Hi Greg,
the link you provided is only for Jira 9!
Do you know where the AUI-Documentation for Jira 10.x is?
Kind regards
Michael
Hi Michael,
I linked to AUI docs! With an assumption: “if it works in a standalone AUI, but does not in Jira, it might be a Jira issue”. And unfortunately I don’t yet know enough about Jira to help with this 
Hi @michael.kornatzki,
The issue seems to be caused by an incorrect z-index calculation.
This was my workaround at the time, but it appears to be fixed now. If you’re still experiencing the problem, you can try this:
.select2-drop.select2-display-none.select2-with-searchbox.select2-drop-active {
z-index: 3000 !important;
}
Thank you, but it doesn’t work for me.
I can select an option with keyboard but not with mouse
Hi guys,
After multiple verifications and attempts, the issue has been identified as ScriptRunner, which is assigning a z-index of 799
@rlander can you verify this case? I tested it on version 9.12 and 9.14 - each time z-index is set to 799, which causes select2 to work incorrectly (Jira 10.*) - after disabling SR z-index is set to 3000 by default.
Workaround - CSS:
div.select2-drop.select2-display-none.select2-drop-active {
z-index: 3000 !important;
}
Cheers
Adam
Hey,
Yes this is us, we’ve got some JS in global contexts that appears to be a little too eager and is modifying zIndex on all AUI dropdowns.
The team is aware and are triaging/discussing today to my knowledge. Trying to push for a hotfix that removes the problematic code.
There are currently multiple bugs raised on our end for each impacted app, I have asked us to merge those bugs into a single common one to make tracking this easier.
Apologies pushing for a quick resolution on my end,
Reece
1 Like
Thanks for the info.
Could you please provide a public ticket where we can monitor the progress? In the meantime, we will implement a CSS workaround.
Just waiting on the merges to happen on our end so there will be a public link I can share.