Bug 1396323 - Don't initialize HTMLInputElement editor for eVoidEvent. r?ehsan
Keyboard APZ dispatches an eVoidEvent to gather all event targets that a key event
would normally go to. This can sometimes trigger an HTMLInputElement to initialize its
editor, which can cause unnecessary DOM modifications.
MozReview-Commit-ID: 6EEttouVB81
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -3574,16 +3574,17 @@ HTMLInputElement::NeedToInitializeEditor
// handled without the editor being initialized. These events include:
// mousein/move/out, overflow/underflow, and DOM mutation events.
if (!IsSingleLineTextControl(false) ||
aVisitor.mEvent->mClass == eMutationEventClass) {
return false;
}
switch (aVisitor.mEvent->mMessage) {
+ case eVoidEvent:
case eMouseMove:
case eMouseEnterIntoWidget:
case eMouseExitFromWidget:
case eMouseOver:
case eMouseOut:
case eScrollPortUnderflow:
case eScrollPortOverflow:
return false;