drop down menu - Why does an ASP.NET DropDownList control requires two clicks to expand in Internet Explorer -


i have asp.net dropdownlist control renders dropdown list (select html tag) on page. reason, when i'm in internet explorer, requires 2 clicks me open , see options, click end-user. works fine in google chrome, mozilla firefox , safari--i have click once see options selection. why not work correctly in ie? , more importantly, how can fix in ie?

here code:

<asp:dropdownlist id="ddlclientname" runat="server" enableviewstate="false" autopostback="true" class="inputfield" onfocus="change(this, event)" onblur="change(this, event)">

had remove hard-coded onfocus event. ie handles first click focus event, , second expand dropdown. guess known quirk ie along other 400+ quirks.

i still trying figure out way change styles of dropdown on focus. depending on code put callback anonymous function, may still need click dropdown twice in ie. i've found can monkey other controls, inside function , doesn't require 2 clicks. i'll keep answer now. guess because of microsoft can't use onfocus @ on dropdowns. may try using actual select tag rather using microsoft's asp.net dropdownlist, , see if can use onfocus event then, without click. doubt it.

jquery(this.elements.ddlclientname).focus(function() { .. put code here });


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -