diff --git a/dom/plugins/PluginInstanceParent.cpp b/dom/plugins/PluginInstanceParent.cpp index bf18d7ce3f2..4f59f1edc08 100644 --- a/dom/plugins/PluginInstanceParent.cpp +++ b/dom/plugins/PluginInstanceParent.cpp @@ -897,7 +897,11 @@ PluginInstanceParent::PluginWindowHookProc(HWND hWnd, switch (message) { case WM_SETFOCUS: - self->CallSetPluginFocus(); + // Widget may be calling us back from AnswerPluginGotFocus(), make + // sure we don't end up sending this back over. If we're not in + // SendMessage, this is coming from the dom / focus manager. + if ((::InSendMessageEx(NULL) & ISMEX_SEND|ISMEX_REPLIED) != ISMEX_SEND) + self->CallSetPluginFocus(); break; case WM_CLOSE: