Extremely laggy Responsiveness of asp.net LinkButton in FireFox inside a UpdatePanel
I have a little problem with a LinkButton in a UserControl based asp.net application. In Firefox, one single click on the LinkButton does not do anything. You have to press and hold the LinkButton for approx. 800ms to successfully trigger the PostBack.
Edit: The Focus outline is lagging too. When i click on that LinkButton, the outline-change needs approximately the same amount of time you have to hold the button the trigger the postback.
notes:
- the webapplication and the LinkButtons are working perfectly in IE and Chrome
- the javascript libraries 开发者_Go百科(external and internal) are currently neither obfuscated nor compressed
Here's the asp.net markup:
<li id="liMemberGetPerson" runat="server" class="inactive clear">
<div class="tab clear">
<div class="tab-left"></div>
<div class="tab-main">
<asp:LinkButton ID="lbPersonArea" runat="server"
Text="Person" CausesValidation="false"
OnCommand="OnMemberViewAspectChange"
CommandArgument="MemberGetPerson" />
</div>
<div class="tab-right"></div>
</div>
</li>
Edit: the "code-behind":
protected void OnMemberViewAspectChange(Object sender, CommandEventArgs e){
AppAction currentAction = HistoryManagerFactory.GetCommandManager().GetCurrentCommand();
AppAction newAction = new AppAction();
newAction.ViewType = ViewType.MemberView;
newAction.AspectType = (AspectType)Enum.Parse(typeof(AspectType), e.CommandArgument.ToString());
newAction.ObjectID = currentAction.ObjectID;
newAction.Mode = currentAction.Mode;
HistoryManagerFactory.GetCommandManager().AddNewCommand(newAction);
ChangeAspect( newAction );}
The ChangeAspect()
method call renders the corresponding View ( UserControl ).
I have tried the following without success:
- Disable the Firefox Client Caching
- Disabling PartialPage Updates (disabling the UpdatePanels)
If anyone has ever encountered this problem, i'd be very thankful to hear about any possible solutions.
with kind regards
Ole
I have solved the issue and if anybody wants to know, here is the solution.
As you can see in the original question, the LinkButton was part of a List Item (li) block. The list item has been styled to be a tab control with rounded corners for each tab header. The css-class for the <ul>
involved in this had the following attribute:
display:inline;
I do not excactly understand, why this has affected the responsiveness of the LinkButton inside, but anyway, removing it solved the problem.
You mention javascript libraries - is it possible that there are there event handlers capturing click events for the LinkButton or its parents? Debug the javascript with FireBug, set a breakpoint at the line of the rendered <a href ... onclick="javascript:WebForm_DoPostBackWithOptions(...)">
tag, click, and see where you're getting held up.
try OnClick event for executing instead OnCommand... Onclick is recognized by all browsers
精彩评论