Home / Community & Support / Knowledge Base / RadControls for ASP.NET and ASP.NET AJAX / ComboBox / RadComboBox in ModalPopupExtender - wrong DropDown position under Firefox & Safari

RadComboBox in ModalPopupExtender - wrong DropDown position under Firefox & Safari

Article Info

Rating: 1

Article information

Article relates to

 RadComboBox 2.84
 RadCombobox for ASP.NET AJAX (Prometheus)
 Telerik.Web.UI v.2008.1.x

Created by

 Veskoni, Telerik

Last modified by

 Veskoni, Telerik



PROBLEM
In Firefox and Safari if you have a RadComboBox in a ModalPopupExtender panel, and you scroll the main page a bit before popping up the ModalPopup, then the RadComboBox popup does not appear in the correct position.


SOLUTION
You need to subscribe to the OnClientDropDownOpening event and define its handler as follows



function OnDropDownOpening (sender, eventArgs) 
    if (!$telerik.isIE) 
    { 
        var dropDownWrapper = sender.get_dropDownElement().parentNode;        
        dropDownWrapper.style.marginTop = document.body.parentNode.scrollTop + 'px;'
    } 





function onDropDownOpening_Classic(combo) 
    if (navigator.userAgent.match(/MSIE/i) == null
    { 
        var dropDownElement = document.getElementById(combo.DropDownID);        
        var dropDownWrapper = dropDownElement.parentNode;         
        dropDownWrapper.style.marginTop = document.body.parentNode.scrollTop + 'px';     
    }     

Comments

If you'd like to comment on this KB article, please, send us a Support Ticket.
Thank you!

Please Sign In to rate this article.