Fix focus-stealing for button elements (bug 299677). Patch by darin, r=me sr=dveditz b181=me.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@195030 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bryner%brianryner.com
2006-04-21 02:11:59 +00:00
parent d45ddc5123
commit cd4bcd65ff

View File

@@ -172,7 +172,9 @@ NS_IMPL_STRING_ATTR_DEFAULT_VALUE(nsHTMLButtonElement, Type, type, "submit")
NS_IMETHODIMP
nsHTMLButtonElement::Blur()
{
SetElementFocus(PR_FALSE);
if (ShouldFocus(this)) {
SetElementFocus(PR_FALSE);
}
return NS_OK;
}