mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1151186 part.2 nsHTMLEditor should accept composition events even while there is no active editing host but it has composition r=ehsan
This commit is contained in:
parent
3a535fd2d0
commit
ed38b0607f
@ -146,6 +146,8 @@ GetEventMessageName(uint32_t aMessage)
|
||||
return "NS_COMPOSITION_CHANGE";
|
||||
case NS_COMPOSITION_COMMIT_AS_IS:
|
||||
return "NS_COMPOSITION_COMMIT_AS_IS";
|
||||
case NS_COMPOSITION_COMMIT:
|
||||
return "NS_COMPOSITION_COMMIT";
|
||||
default:
|
||||
return "unacceptable event message";
|
||||
}
|
||||
|
@ -5211,6 +5211,13 @@ nsHTMLEditor::IsAcceptableInputEvent(nsIDOMEvent* aEvent)
|
||||
return false;
|
||||
}
|
||||
|
||||
// While there is composition, all composition events in its top level window
|
||||
// are always fired on the composing editor. Therefore, if this editor has
|
||||
// composition, the composition events should be handled in this editor.
|
||||
if (mComposition && aEvent->GetInternalNSEvent()->AsCompositionEvent()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
NS_ENSURE_TRUE(mDocWeak, false);
|
||||
|
||||
nsCOMPtr<nsIDOMEventTarget> target;
|
||||
|
Loading…
Reference in New Issue
Block a user