Trouble selecting options in aui-select2 in Jira 10

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:

  • Steps to Reproduce:
  1. I initialize the aui-select2 dropdown using the following JavaScript code:
AJS.toInit(function() {
  AJS.$("#my-select2").auiSelect2();
})
  1. The dropdown is rendered correctly and displays the placeholder text.
  2. 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 :frowning:

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