Fix for bug 78989, force focus events to go their corresponding view as opposed to using coordinate targeting which can be incorrect. r:roc+moz, sr:jst

git-svn-id: svn://10.0.0.236/trunk@118961 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
joki%netscape.com
2002-04-14 21:45:04 +00:00
parent ac3b5c6c15
commit 34048fc38a
2 changed files with 8 additions and 1 deletions

View File

@@ -2021,7 +2021,7 @@ nsEventStatus nsViewManager::HandleEvent(nsView* aView, nsGUIEvent* aEvent, PRBo
// accessibility events and key events are dispatched directly to the focused view
if (aEvent->eventStructType == NS_ACCESSIBLE_EVENT || aEvent->message == NS_CONTEXTMENU_KEY
|| NS_IS_KEY_EVENT(aEvent) || NS_IS_IME_EVENT(aEvent)) {
|| NS_IS_KEY_EVENT(aEvent) || NS_IS_IME_EVENT(aEvent) || NS_IS_FOCUS_EVENT(aEvent)) {
nsEventStatus status = nsEventStatus_eIgnore;
if (obs) {
PRBool handled;

View File

@@ -589,6 +589,13 @@ enum nsDragDropEventStatus {
((evnt)->message == NS_RECONVERSION_QUERY) || \
((evnt)->message == NS_COMPOSITION_QUERY))
#define NS_IS_FOCUS_EVENT(evnt) \
(((evnt)->message == NS_GOTFOCUS) || \
((evnt)->message == NS_LOSTFOCUS) || \
((evnt)->message == NS_ACTIVATE) || \
((evnt)->message == NS_DEACTIVATE) || \
((evnt)->message == NS_PLUGIN_ACTIVATE))
/*
* Virtual key bindings for keyboard events.
* These come from nsIDOMKeyEvent.h, which is generated from MouseKeyEvent.idl.