Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-3069

Dropdown menu goes outside of screen

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • Professional Edition
    • Web Interface

    Description

      I have a problem that has actually annoyed me for years. We have a lot of locations, which again will make many sub dropdowns on the menu. Problem is when you have too many the dropdown will disappear outside of the screen. Would it be possible to "shift" the right hand dropdown upwards on the screen or add a scrollbar, or better yet both, if you have many many locations

      See attached picture for illustration.

      Attachments

        Activity

          [OBS-3069] Dropdown menu goes outside of screen

          Not working, the last submenu won't show using this. Also tried to use the pre-scrollable class already available.

          After some reading it seems indeed javascript must be used to workaround this.

          Maybe someone with better css and javascript knowledge then me have an idea

           

          kentbjoh Kent Johannessen added a comment - Not working, the last submenu won't show using this. Also tried to use the pre-scrollable class already available. After some reading it seems indeed javascript must be used to workaround this. Maybe someone with better css and javascript knowledge then me have an idea  

          This is pretty annoying, but difficult to fix. I'm not really sure it can be fixed in pure CSS, because you'd need to some how know the position of the parent and the height of the menu to set positions before you draw them.

          Likely this could only be fixed with a javascript system to handle the menus.

          The best we could probably do is to limit the height of the menu and make it scroll, which would also be annoying, but might at least let you reach items on the bottom of the menu.

          Try adding : 

          max-height: 800px;

          overflow-y: scroll;

          to the 

          .dropdown-submenu > .dropdown-menu { }

          class in the css. You can either do this with the chrome inspect tool (do it on the frontpage, so it doesn't auto-refresh), or you can edit htmls/css/observium.css around line ~5929

          Does this make it more usable?

           

          adama Adam Armstrong added a comment - This is pretty annoying, but difficult to fix. I'm not really sure it can be fixed in pure CSS, because you'd need to some how know the position of the parent and the height of the menu to set positions before you draw them. Likely this could only be fixed with a javascript system to handle the menus. The best we could probably do is to limit the height of the menu and make it scroll, which would also be annoying, but might at least let you reach items on the bottom of the menu. Try adding :  max-height: 800px; overflow-y: scroll; to the  .dropdown-submenu > .dropdown-menu { } class in the css. You can either do this with the chrome inspect tool (do it on the frontpage, so it doesn't auto-refresh), or you can edit htmls/css/observium.css around line ~5929 Does this make it more usable?  

          People

            adama Adam Armstrong
            kentbjoh Kent Johannessen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: