diff options
Diffstat (limited to 'fpdfsdk/javascript')
-rw-r--r-- | fpdfsdk/javascript/Document.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/javascript/app.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp index 233097e42c..c143edd88a 100644 --- a/fpdfsdk/javascript/Document.cpp +++ b/fpdfsdk/javascript/Document.cpp @@ -531,7 +531,9 @@ FX_BOOL Document::removeField(IJS_Context* cc, // and creating a new pageview at this point will cause bad things. CPDFSDK_PageView* pPageView = m_pDocument->GetPageView(pPage, false); if (pPageView) { +#if PDF_ENABLE_XFA pPageView->DeleteAnnot(pWidget); +#endif // PDF_ENABLE_XFA pPageView->UpdateRects(aRefresh); } } diff --git a/fpdfsdk/javascript/app.cpp b/fpdfsdk/javascript/app.cpp index eba8d4d74f..55f976e522 100644 --- a/fpdfsdk/javascript/app.cpp +++ b/fpdfsdk/javascript/app.cpp @@ -433,7 +433,7 @@ FX_BOOL app::alert(IJS_Context* cc, pRuntime->BeginBlock(); if (CPDFSDK_Document* pDoc = pEnv->GetSDKDocument()) - pDoc->KillFocusAnnot(); + pDoc->KillFocusAnnot(0); vRet = CJS_Value(pRuntime, pEnv->JS_appAlert(swMsg.c_str(), swTitle.c_str(), iType, iIcon)); |