This is a migrated thread and some comments may be shown as answers.

Wrong drop down position in firefox 3

3 Answers 106 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Nir
Top achievements
Rank 1
Nir asked on 01 Dec 2008, 02:03 PM
Hi,

I have several comboboxes in a form that are OK in IE but when using firefox the drop down is shown too low (the deviation changes between boxes).
Since the distance of the comboboxes from the top of the screen is fixed, I used the following fix:
<telerik:RadComboBox ID="customer" runat="server" OnClientDropDownOpened="FirefoxDropDownCorrection" ... 
The JS function is (inspired by RadComboBox in ModalPopupExtender - wrong DropDown position under Firefox & Safari):
function FirefoxDropDownCorrection(sender, eventArgs)  
{  
   if (!$telerik.isIE) {  
        var dropDownWrapper = sender.get_dropDownElement().parentNode;         
        var sID = sender.get_id();  
        if ( sID == "customer") { 
            dropDownWrapper.style.top = "63px"
        } 
        if (sID == "searchby" || sID == "FindCombo") { 
            dropDownWrapper.style.top = "125px"
        } 
        if (sID == "CombinedType") { 
            dropDownWrapper.style.top = "212px"
        } 
    } 
}  

This works fine for the "fixed" comboboxes, the problem is for the "load on demand" box which after every "items request" gets positioned wrong again.

How can i fix this issue?

Thanks,
Nir.

3 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 01 Dec 2008, 03:45 PM
Hi Nir,

You could handle the OnClientItemsRequested event and fix the drop down position there again.

Greetings,
Simon
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Nir
Top achievements
Rank 1
answered on 03 Dec 2008, 12:27 PM
Hi,

Your solution does not work for me.
As soon as the "Loading..." message disappears the drop down is positioned wrongly.

I solved it in the most ugly way:
if (Request.Browser.Browser == "Firefox") { 
    FindCombo.OffsetY = -18; 

I hope you can find a better solution for me.

Thanks


0
Atanas Korchev
Telerik team
answered on 04 Dec 2008, 03:56 PM
Hi Nir,

RadComboBox is using the Sys.UI.DomElement.getLocation method to determine the position of the dropdown element. It may be failing in your case due to various reasons - CSS settings, html etc. You can send us a sample page which illustrates the problem so we can test locally.

Regards,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ComboBox
Asked by
Nir
Top achievements
Rank 1
Answers by
Simon
Telerik team
Nir
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question
or