More bug 6823. Add comments to keep this problem from happening again.

This commit is contained in:
waterson%netscape.com 1999-05-21 21:23:04 +00:00
Родитель ca3211269e
Коммит 06a6123e40
3 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -2239,6 +2239,10 @@ RDFElementImpl::HandleDOMEvent(nsIPresContext& aPresContext,
return ret; return ret;
} }
// We need to explicitly set the target here, because the
// DOM implementation will try to compute the target from
// the frame. If we don't have a frame (e.g., we're a
// menu), then that breaks.
nsCOMPtr<nsIPrivateDOMEvent> privateEvent = do_QueryInterface(domEvent); nsCOMPtr<nsIPrivateDOMEvent> privateEvent = do_QueryInterface(domEvent);
if (privateEvent) { if (privateEvent) {
privateEvent->SetTarget(this); privateEvent->SetTarget(this);

Просмотреть файл

@ -2239,6 +2239,10 @@ RDFElementImpl::HandleDOMEvent(nsIPresContext& aPresContext,
return ret; return ret;
} }
// We need to explicitly set the target here, because the
// DOM implementation will try to compute the target from
// the frame. If we don't have a frame (e.g., we're a
// menu), then that breaks.
nsCOMPtr<nsIPrivateDOMEvent> privateEvent = do_QueryInterface(domEvent); nsCOMPtr<nsIPrivateDOMEvent> privateEvent = do_QueryInterface(domEvent);
if (privateEvent) { if (privateEvent) {
privateEvent->SetTarget(this); privateEvent->SetTarget(this);

Просмотреть файл

@ -2239,6 +2239,10 @@ RDFElementImpl::HandleDOMEvent(nsIPresContext& aPresContext,
return ret; return ret;
} }
// We need to explicitly set the target here, because the
// DOM implementation will try to compute the target from
// the frame. If we don't have a frame (e.g., we're a
// menu), then that breaks.
nsCOMPtr<nsIPrivateDOMEvent> privateEvent = do_QueryInterface(domEvent); nsCOMPtr<nsIPrivateDOMEvent> privateEvent = do_QueryInterface(domEvent);
if (privateEvent) { if (privateEvent) {
privateEvent->SetTarget(this); privateEvent->SetTarget(this);