Author: abelevich
Date: 2008-12-24 11:40:12 -0500 (Wed, 24 Dec 2008)
New Revision: 12013
Modified:
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/comboboxUtils.js
Log:
fix comboBox/inplaceSelect list
Modified:
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/comboboxUtils.js
===================================================================
---
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/comboboxUtils.js 2008-12-24
16:34:15 UTC (rev 12012)
+++
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/comboboxUtils.js 2008-12-24
16:40:12 UTC (rev 12013)
@@ -61,31 +61,18 @@
viewportheight = document.getElementsByTagName('body')[0].clientHeight;
}*/
- if( typeof document.documentElement != 'undefined' && typeof
document.documentElement.clientWidth != 'undefined' &&
document.documentElement.clientWidth != 0 ) {
- return document.viewport.getDimensions().height +
document.viewport.getScrollOffsets().top;
- } else {
-
- var scrollOffsets = 0;
- var innerHeight = 0;
-
- if(document.documentElement) {
- scrollOffsets += document.documentElement.scrollTop ?
document.documentElement.scrollTop : 0 ;
- innerHeight += document.documentElement.clientHeigh ?
document.documentElement.clientHeigh : 0 ;
- }
-
- if (document.body) {
- scrollOffsets += document.body.scrollTop ? document.body.scrollTop : 0;
- innerHeight += document.body.clientHeight ? document.body.clientHeight : 0;
- }
-
- scrollOffsets += window.pageYOffset;
- innerHeight += self.innerHeight;
-
- return innerHeight + scrollOffsets;
-
+ var viewportheight = 0;
+
+ // must be checked in the next prototype release version !!!
+ if(Richfaces.browser.isIE6) {
+ var height = (document.compatMode=='CSS1Compat') ?
document.documentElement['clientHeight'] : document.body['clientHeigth'];
+ var scrollHeight = document.viewport.getScrollOffsets().top;
+ viewportheight = height + scrollHeight;
+ } else {
+ viewportheight = document.viewport.getDimensions().height +
document.viewport.getScrollOffsets().top;
}
- //return viewportheight;
+ return viewportheight;
}
Richfaces.getScrollWidth = function(elem) {
Show replies by date