1. #1
    Sencha User
    Join Date
    Jun 2010
    Posts
    10
    Vote Rating
    0
    quodroc is on a distinguished road

      0  

    Default LiveGrid scrollbar disappears if scrollbar is too large in Firefox

    LiveGrid scrollbar disappears if scrollbar is too large in Firefox


    You can see it in the livegrid example http://www.sencha.com/examples/#livegrid
    If you increase the size of the scrollbar beyond 18 pixels, either by increasing the DPI/font settings or manually increasing the scrollbar size, it disappears in Firefox.

    Firefox will refuse to draw a scrollbar if the div is too narrow to fit it, and the livescroller div is given a fixed width of 18px from gxt-all.css.

    Removing/overriding this CSS rule will allow the scrollbars to show up, but there is still a lesser problem:
    the column widths don't line up with the scrollbar gutter.

    Investigating further, there seems to be 2 reasons for this:

    First, inside GridView, the scrollOffset field is set to a hardcoded 19 pixels, when it should really be Math.max(19, XDOM.getScrollBarWidth()) as seen in a few other places.

    Changing this alone does not completely fix the problem, because XDOM.getScrollBarWidth() is actually broken in Firefox and always returns 0 if the scrollbar size exceeds 25 pixels.

  2. #2
    Sencha User
    Join Date
    Jun 2010
    Posts
    10
    Vote Rating
    0
    quodroc is on a distinguished road

      0  

    Default


    Also, the value '19' is hardcoded as the scrollbar size in a few other places,
    (line numbers are for GXT 2.2.3)
    GridView line 138 (mentioned above)
    LiveGridView line 375
    RowLayout lines 92, 189

  3. #3
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,691
    Vote Rating
    107
    sven is just really nice sven is just really nice sven is just really nice sven is just really nice

      0  

    Default


    We will look into this for GXT3. There are serveral more changes needed to make this completly work.

    I just did some fast testing for getScrollBarWidth and it works fine for me in FF.

  4. #4
    Sencha User
    Join Date
    Jun 2010
    Posts
    10
    Vote Rating
    0
    quodroc is on a distinguished road

      0  

    Default


    Just retested and for me, getScrollBarWidth works in Firefox as long as the width is less than 26px.

  5. #5
    Sencha User
    Join Date
    Jun 2010
    Posts
    10
    Vote Rating
    0
    quodroc is on a distinguished road

      0  

    Default


    For anyone interested, I have reached a satisfactory workaround by adding the following css:
    Code:
    .x-grid-panel .x-livegrid-scroller {
      width: auto;
      padding-left: 1px;
    }
    and overriding LiveGridView with
    Code:
    public LiveGridViewExtended() {
        super();
        scrollOffset = Math.max(19, XDOM.getScrollBarWidth());
    }

  6. #6
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,691
    Vote Rating
    107
    sven is just really nice sven is just really nice sven is just really nice sven is just really nice

      0  

    Default


    I had an outstanding commit that fixed this (including other things). I commited the scrollbar size calculation to SVN. I also removed the hardcoded size as you mentioned too.

  7. #7
    Sencha User
    Join Date
    Jun 2010
    Posts
    10
    Vote Rating
    0
    quodroc is on a distinguished road

      0  

    Default


    Thank you for the speedy resolution, much appreciated.

Similar Threads

  1. LiveGrid up/down Scrollbar doesn't display in some machine
    By pclovec in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 27 Apr 2010, 12:50 PM
  2. Replies: 1
    Last Post: 23 May 2009, 1:16 AM
  3. unable to scroll down with Ajax scrollbar using livegrid
    By padmavathi in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 21 Nov 2008, 12:24 AM
  4. Scrollbar disappears in LayoutDialog ContentPanel
    By nheminge in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 13 Nov 2007, 3:57 PM