The OnPrerender() solution above didn't work for my app.
I had this issue in IE and Firefox. In IE the first time the user pressed enter the default button fired, but after that it won't fire. In FireFox is was just the opposite, the first time it wouldn't fire and then it fired fine after that.
The fix I came up with (after seeing the OnPrerender() exmaple) is to set the __defaultFired variable appropriately in the pageLoad() function which AJAX calls after the page is completely loaded. This works for IE, Firefox and Safari.
<script type="text/javascript" language="javascript">
function pageLoad()
{
if (navigator.userAgent.indexOf("Firefox")!=-1)
{
__defaultFired = true;
}
else
{
__defaultFired = false;
}
}
</script>
I put this on my master page and now all my default buttons fire properly now.
Anyone know why Firefox has the reverse logic for __defaultFired???