PDA

View Full Version : [CLOSED][3.??] Ext.getScrollBarWidth returns wrong width



Koos
2 Feb 2010, 5:30 AM
Ext version tested:

Ext 3.1.0 rev ____


Adapter used:

ext


css used:

only default ext-all.css




Browser versions tested against:


IE8
FF3.5.2


Operating System:

Windows Vista


Description:

Ext.getScrollBarWidth returns 19 while the real width is 17


Test Case:



Ext.onReady(function() {

var div = Ext.DomHelper.append(document.body, '<div style="width:50px;height:50px;overflow:hidden;overflow-y:scroll;position:absolute;"><div style="height:100px;"></div>', true);
alert("Ext.getScrollbarWidth=" + Ext.getScrollBarWidth());
alert("offsetWidth-clientWidth " + (div.dom.offsetWidth - div.dom.clientWidth));
});



Steps to reproduce the problem:

See alerts in Testcase



The result that was expected:

17


The result that occurs instead:

19


Debugging already done:

none


Possible fix:

not provided

Jamie Avins
2 Feb 2010, 9:44 AM
getScrollBarWidth always adds 2 pixels in it's measurement, this is by design.

Tom23
31 Aug 2010, 3:55 AM
Seriously, this should be mentioned in the docs.