I have a heisenbug - it works when I put a Firebug breakpoint on it, but it doesn't work without the breakpoint.

The LoginSubmit function is called from two places in my code. In one instance, the btnLoginSubmit\_Click event is fired successfully, but in the other instance, the event doesn't fire unless I put a breakpoint on the $submitButton.click(); line.

```
function LoginSubmit() {
    $("#diagnostics").text("");
    var $submitButton = $("#<%=btnLoginSubmit.ClientID %>");
    $submitButton.click();  // <-- This is the line of code that is not executing.
    $("#diagnostics").text("LoginSubmit failed to submit postback. ");
}

  <asp:Button ID="btnLoginSubmit" runat="server" Text="Submit" CssClass="hiddenButton" 
        OnClick="btnLoginSubmit_Click" OnClientClick="return true;" Visible="true" />

```

Code behind page:

```
   protected void btnLoginSubmit_Click(object sender, EventArgs e)
    {
....
    }

```