开发者

enabling submit button doesn't take effect until mouse moved

I have an ASP.NET 4.0 Master Page containing a TextBox and a Button. The Button is initially disabled, and the TextBox has an onkeyup attached to enable/disable the Button based on whether anything is entered.

The problem is, then when the application is run in IIS and the user enters text in IE8, the Button doesn't enable/disable immediately. However, as the mouse moves into/out-of certain elements, e.g. the browser window, it does enable/disable accordingly.

The problem doesn't happen if run from in the IDE (in Debug or Release configuration), or if browse using Firefox 4, or if I downgr开发者_如何学Pythonade jQuery from 1.6.2 to 1.6.1 or earlier.

The code to enable the button is:

okButton.attr("disabled", false);

but I get the same problem with:

okButton[0].disabled = false;

or with:

okButton.removeAttr("disabled");

If I add this line:

okButton.attr("value", "enabled");

the text on the button changes immediately, but it doesn't enable until I move the mouse appropriately.

Update 12/09/11 14:47

Found the issue doesn't happen with jQuery 1.4.4 / 1.5.2 / 1.6 / 1.6.1, but does with jQuery 1.6.2.


Upgrade jQuery to 1.6.3.

(Don't know why this works, but it does).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜