Recently I found an error in my web apps when I ran it to Google Chrome.
After debugging , It seems Google Chrome do prefill after the page load and trigger the javascript.
So be careful to have this javascript which purposely trigger login button on change on password text box.
var setupTriggerButton = function ()
{
//for login trigger
//DON'T DO ONCHANGE - only use keypress, because browser (Chrome) can automatically fill and cause postback
/*
$(".txtTriggerButton").live("change", function (e)
{
var rel = $(this).attr("rel");
if (rel && rel != "")
{
$(rel).click();
}
});
*/
//trigger login
$(".txtTriggerButton").live("keypress", function (e)
{
var rel = $(this).attr("rel");
if (rel && rel != "")
{
//$.log('run from DISABLE DEFAULT BUtton');
return runFunctionOnEnter(e,
function ()
{
$(rel).click();
}
);
}
});
}
No comments:
Post a Comment