diff options
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/cpdfsdk_xfawidgethandler.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp index 7eb56570c3..e39f8ceda2 100644 --- a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp +++ b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp @@ -302,6 +302,15 @@ bool CPDFSDK_XFAWidgetHandler::OnSetFocus(CPDFSDK_Annot::ObservedPtr* pAnnot, bool CPDFSDK_XFAWidgetHandler::OnKillFocus(CPDFSDK_Annot::ObservedPtr* pAnnot, uint32_t nFlag) { + CXFA_FFWidget* hWidget = *pAnnot ? (*pAnnot)->GetXFAWidget() : nullptr; + if (!hWidget) + return true; + + CXFA_FFPageView* pXFAPageView = hWidget->GetPageView(); + if (!pXFAPageView) + return true; + + pXFAPageView->GetDocView()->SetFocus(nullptr); return true; } |