Bug 328885, r+sr=bz

This commit is contained in:
Olli.Pettay%helsinki.fi 2006-03-08 20:22:35 +00:00
parent 1a19fc9e12
commit 7f852eb898
2 changed files with 7 additions and 7 deletions

View File

@ -1886,6 +1886,13 @@ nsGenericElement::PreHandleEvent(nsEventChainPreVisitor& aVisitor)
aVisitor.mCanHandle = PR_TRUE;
nsCOMPtr<nsIContent> parent = GetParent();
if (IsNativeAnonymous()) {
// Don't propagate mutation events which are dispatched somewhere inside
// native anonymous content.
if (aVisitor.mEvent->eventStructType == NS_MUTATION_EVENT) {
aVisitor.mParentTarget = nsnull;
return NS_OK;
}
aVisitor.mEventTargetAtParent = parent;
} else if (parent) {
nsCOMPtr<nsIContent> content(do_QueryInterface(aVisitor.mEvent->target));

View File

@ -1281,13 +1281,6 @@ nsHTMLInputElement::PreHandleEvent(nsEventChainPreVisitor& aVisitor)
}
}
// Don't allow mutation events which are targeted somewhere inside
// <input>, except if they are dispatched to the element itself.
if (aVisitor.mEvent->eventStructType == NS_MUTATION_EVENT &&
aVisitor.mEvent->originalTarget != NS_STATIC_CAST(nsIContent*, this)) {
return NS_OK;
}
//
// Web pages expect the value of a radio button or checkbox to be set
// *before* onclick and DOMActivate fire, and they expect that if they set