1

我在使用 Internet Explorer 8+ 和 select2 组件时遇到了一个奇怪的问题。当我选择一个值时,我会执行异步回发以刷新下拉列表。之后,我无法滚动页面或单击任何按钮,直到我单击页面或其他控件的背景。

这是页面的结构

Javascript:

$(function()
{
    var prm = Sys.WebForms.PageRequestManager.getInstance();
    prm.add_endRequest(function (sender, args) {
        InitSelect();
    });

    InitSelect();
});
function InitSelect(){
         $('select')
               .select2() 
               .off('change')
               .change(function () { __doPostBack(this.id, "dllChanged"); });
}

ASP.NET

<asp:UpdatePanel ID="udpBase" runat="server" UpdateMode="Conditional">
  <ContentTemplate>
    <asp:UpdatePanel ID="udpSomething" runat="server" UpdateMode="Conditional">
         <ContentTemplate>
             <CustomControl:DropDownList ID="element1" runat="server" />
             <CustomControl:DropDownList ID="element2" runat="server" />
             <CustomControl:DropDownList ID="element3" runat="server" />      
         </ContentTemplate>
     </asp:UpdatePanel>
     <asp:Button id="btn" runat="server" />
  </ContentTemplate>
</asp:UpdatePanel>

在 Firefox、Chrome、Opera 上运行良好...

在更改事件之后,我尝试将焦点设置到页面的主体。现在可以点击按钮,但滚动问题仍然存在......

我在用着 :

jQuery:1.10.2
选择 2:3.4.5
ASP.NET:3.5

我希望你能帮帮我... :)

4

0 回答 0