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
This commit is contained in:
Родитель
5864247424
Коммит
e385f718ea
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче