Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-95097

auiSelect2 z-index issue when used with 2 modals

XMLWordPrintable

      Issue Summary

      This is reproducible on Data Center: yes

      The logic behind assigning a z-index to auiSelect2 is not working correctly. The drop-down list of a child modal window considers its parent not the modal window in which it was opened, that is - the very first open modal window. Because of this, the dropdown list is not visible.

      In short, the parent modal has a z-index of 3000, the child has a z-index of 3100, and the dropdown has a z-index of 3002 (it should be 3102). The drop-down list considers the modal window to be the parent of the parent, and therefore the display does not work correctly.

      This issue started in Confluence 8.8.0

      AUI Select2 uses version 3.5.x of Select2. In this version you can set the z-index with 

      dropdownCss: { "z-index": "10000" } 

      but this then causes errors in the UI with the Select2 dropdown not disappearing after use.

      In version 4.x of https://select2.org/ it has option

      dropdownParent: $('#child-modal-dialog') 

      which would fix this issue.

      This is also referenced in https://community.developer.atlassian.com/t/aui-dialog2-issue-with-select2-dropdown/77627

      Steps to Reproduce

      1. Create a button that appears on a modal in Confluence
      2. Create a modal that opens a new dialog
      3. In the dialog create a new Select2

      Expected Results

      The Select2 dialog works as expected.

      Actual Results

      The Select2 drop down list does not appear in the view.

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              Unassigned Unassigned
              jrichards@atlassian.com James Richards
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: