mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-26 18:31:29 +00:00
Bug 335251, prevent load events to propagate to window, r=bz, sr=jst
This commit is contained in:
parent
dd95e269cd
commit
1b31151599
@ -3974,7 +3974,13 @@ nsDocument::PreHandleEvent(nsEventChainPreVisitor& aVisitor)
|
||||
// FIXME! This is a hack to make middle mouse paste working also in Editor.
|
||||
// Bug 329119
|
||||
aVisitor.mForceContentDispatch = PR_TRUE;
|
||||
aVisitor.mParentTarget = GetWindow();
|
||||
|
||||
// Load events must not propagate to |window| object, see bug 335251.
|
||||
if (!(aVisitor.mEvent->message == NS_IMAGE_LOAD ||
|
||||
aVisitor.mEvent->message == NS_PAGE_LOAD ||
|
||||
aVisitor.mEvent->message == NS_SCRIPT_LOAD)) {
|
||||
aVisitor.mParentTarget = GetWindow();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -1721,9 +1721,7 @@ nsGlobalWindow::PreHandleEvent(nsEventChainPreVisitor& aVisitor)
|
||||
}
|
||||
|
||||
// Check chrome document capture here.
|
||||
// XXX The chrome can not handle this, see bug 51211
|
||||
// FIXME Fix this for other *LOAD events, bug 329514.
|
||||
if (mChromeEventHandler && msg != NS_IMAGE_LOAD) {
|
||||
if (mChromeEventHandler) {
|
||||
aVisitor.mParentTarget = mChromeEventHandler;
|
||||
aVisitor.mParentIsChromeHandler = PR_TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user