1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Won't Fix Gallery: hides dropdown when window loses focus

Discussion in 'Media Gallery Resolved Bugs' started by Arty, Nov 12, 2014.

  1. Arty

    Arty Well-Known Member

    There is an annoying issue in XenForo Media Gallery 1.0.0 when trying to upload new media at this URL: /media/add

    First option is to select category with dropdown from predefined categories. Problem is its impossible to style that dropdown for custom styles because its behavior prevents dropdown from being inspected. I click dropdown and I see this:

    dropdown.png

    I wanted to fix colors of "Example Category" in my style, to do that I need to find out what class it is so I could find entry in gallery css templates.

    Problem is, as soon as I click on browser tools' inspection window, dropdown closes. As soon as browser window loses focus that dropdown closes.

    There is no reason for dropdown to behave like that. It is not only inconsistent with the rest of XenForo scripts, but also makes it hard to debug designs. Please remove that behavior from JavaScript.
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    The current behaviour you're reporting is a behaviour in the "Chosen" library that is being used in the Gallery. It does seem to be somewhat browser dependent, though.

    It doesn't do this for me in Chrome.

    I can sort of see the behaviour in Firefox. The dropdown closes when I click Inspect Element, but it focuses the correct elements in the inspector, and from then on I can see and do enough to ascertain what the class names are.

    It also works correctly for me in Safari, just as with Chrome.
     
    Last edited: Nov 12, 2014
  3. Arty

    Arty Well-Known Member

    Thanks for reply. I'll do debugging in Chrome then :)
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    I'll definitely look at it, but just wanted to point out the differences of behaviour depending on the browser :)
     
  5. Chris D

    Chris D XenForo Developer Staff Member

    By the way, it is not Select2. It is "Chosen", don't know what I was thinking :)

    CSS is all in xengallery_media_edit.css and prefixed with the class "chosen".
     
  6. Chris D

    Chris D XenForo Developer Staff Member

    Unfortunately the Chosen library controls most of this behaviour, but in most of my testing it's easy enough to inspect something close to things like the drop down contents, e.g. the search/filter box.

    We may look at using something other than Chosen in the future, but we'll save that for a more major update. I have updated Chosen to the latest version, though, just to ensure it's as bug free as possible.
     

Share This Page