-
6 May 2011 12:10 PM #1
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.
-
6 May 2011 12:28 PM #2
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
-
6 May 2011 12:29 PM #3
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.
-
6 May 2011 12:45 PM #4
Just retested and for me, getScrollBarWidth works in Firefox as long as the width is less than 26px.
-
6 May 2011 1:10 PM #5
For anyone interested, I have reached a satisfactory workaround by adding the following css:
and overriding LiveGridView withCode:.x-grid-panel .x-livegrid-scroller { width: auto; padding-left: 1px; }
Code:public LiveGridViewExtended() { super(); scrollOffset = Math.max(19, XDOM.getScrollBarWidth()); }
-
6 May 2011 1:42 PM #6
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.
-
9 May 2011 6:17 AM #7
Thank you for the speedy resolution, much appreciated.

Similar Threads
-
LiveGrid up/down Scrollbar doesn't display in some machine
By pclovec in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 27 Apr 2010, 12:50 PM -
[CLOSED] [2.0 M2] FF & Chrome missing horizontal scrollbar for large content
By winter in forum Ext GWT: Bugs (2.x)Replies: 1Last Post: 23 May 2009, 1:16 AM -
unable to scroll down with Ajax scrollbar using livegrid
By padmavathi in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 21 Nov 2008, 12:24 AM -
Scrollbar disappears in LayoutDialog ContentPanel
By nheminge in forum Ext 1.x: Help & DiscussionReplies: 0Last Post: 13 Nov 2007, 3:57 PM


Reply With Quote