3.0 beta 2

Combobox popup in wrong position-FF3, AW 2.5.2

If the page is scrolled down when the Combobox popup is triggered it's positioned where the object used to be before scrolling.
Jon
July 8,
Yes, this is a bug in AW 2.5.2 :-(

Could be fixed with the following patch -
if (AW.ff3){

    AW.getLeft = function(element){
        return element.getBoundingClientRect().left -
            document.documentElement.getBoundingClientRect().left;
    };

    AW.getTop = function(element){
        return element.getBoundingClientRect().top -
            document.documentElement.getBoundingClientRect().top;
    };
}
Alex (ActiveWidgets)
July 14,
so where should this patch go?
mango
July 17,
Add this code to the end of aw.js or any place in your code before using AW objects.
Alex (ActiveWidgets)
July 18,
i also noticed this problem is happening on firefox version 1 as well. can this patch be modified to work on FF1 as well?
mango
July 18,
No, this is for FF3 only.

FF1 does not have getBoundingClientRect() and instead getBoxObjectFor() is used, which has bugs in early FF1 versions (FF1.5 is fine).
Alex (ActiveWidgets)
July 18,
Fixed in AW 2.5.3 -

/general.bugs/2-5-3.html
Alex (ActiveWidgets)
September 9,
Alex;

I'm still getting the combo popup under the text input box in FF3 using 2.5.3. In IE7 they appear on top of the text box. Here is my sample code

<script>
if (window.parent.Level>=3)
{
var RowHeightCombo = new AW.UI.Combo;
RowHeightCombo.setControlText("Row Height");
RowHeightCombo.setItemText(
["Small",
"Normal",
"Large",
]);
RowHeightCombo.setItemCount(9);
// make input box readonly
RowHeightCombo.getContent("box/text").setAttribute("readonly", true);

// fix for 'contentEditable' attribute
RowHeightCombo.onControlEditStarted = function(){
this.getContent("box/text").element().contentEditable = false;
}

RowHeightCombo.onControlTextChanged = function() {
var ST=RowHeightCombo.getItemValue(RowHeightCombo.getSelectedItems());

switch (ST)
{
case "Small" :
obj.setRowHeight(20);
obj.refresh();
break;

case "Normal" :
obj.setRowHeight(50);
obj.refresh();
break;

case "Large" :
obj.setRowHeight(100);
obj.refresh();
break;

}

};

document.write(RowHeightCombo);
}
</script>


Here is a link to view what's happening

http://www.ibksoftware.com/ffpopup.jpg
Richard Noble
September 11,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.