You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by mt...@apache.org on 2006/11/03 22:17:48 UTC
svn commit: r471015 - /incubator/xap/trunk/src/xap/widgets/ListBox.js
Author: mturyn
Date: Fri Nov 3 14:17:47 2006
New Revision: 471015
URL: http://svn.apache.org/viewvc?view=rev&rev=471015
Log:
Member "trueSize" wasn't properly scoped by "this" in one case, ruined appendChild.
Fixed height's changing when size changed.
Modified:
incubator/xap/trunk/src/xap/widgets/ListBox.js
Modified: incubator/xap/trunk/src/xap/widgets/ListBox.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/widgets/ListBox.js?view=diff&rev=471015&r1=471014&r2=471015
==============================================================================
--- incubator/xap/trunk/src/xap/widgets/ListBox.js (original)
+++ incubator/xap/trunk/src/xap/widgets/ListBox.js Fri Nov 3 14:17:47 2006
@@ -26,8 +26,10 @@
this.select.appendChild(child.domNode);
++this.trueSize ;
- if( trueSize>1){
- this.select.size = trueSize ;
+ if( this.trueSize>1){
+ var cacheHeight = this.select.height ;
+ this.select.size = this.trueSize ;
+ this.select.height = cacheHeight ;
}
//alert('adding an option');
@@ -45,7 +47,9 @@
// Keep this from turning a list box into a combo box
--this.trueSize ;
if(this.trueSize > 1){
+ var cacheHeight = this.select.height ;
this.select.size = this.trueSize ;
+ this.select.height = cacheHeight ;
}
}
/* IE doesn't update the page with dom node removal so we have to do this*/