diff options
Diffstat (limited to 'fpdfsdk/javascript')
-rw-r--r-- | fpdfsdk/javascript/Document.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/javascript/Field.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp index caaeba884e..ace805f3b5 100644 --- a/fpdfsdk/javascript/Document.cpp +++ b/fpdfsdk/javascript/Document.cpp @@ -492,7 +492,7 @@ FX_BOOL Document::removeField(IJS_Context* cc, UnderlyingPageType* pPage = pWidget->GetUnderlyingPage(); ASSERT(pPage); - CPDFSDK_PageView* pPageView = m_pDocument->GetPageView(pPage); + CPDFSDK_PageView* pPageView = m_pDocument->GetPageView(pPage, true); pPageView->DeleteAnnot(pWidget); pPageView->UpdateRects(aRefresh); } diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp index ee910329d5..9b109f7b1b 100644 --- a/fpdfsdk/javascript/Field.cpp +++ b/fpdfsdk/javascript/Field.cpp @@ -3247,7 +3247,8 @@ FX_BOOL Field::setFocus(IJS_Context* cc, pEnv->FFI_GetCurrentPage(m_pDocument->GetUnderlyingDocument())); if (!pPage) return FALSE; - if (CPDFSDK_PageView* pCurPageView = m_pDocument->GetPageView(pPage)) { + if (CPDFSDK_PageView* pCurPageView = + m_pDocument->GetPageView(pPage, true)) { for (int32_t i = 0; i < nCount; i++) { if (CPDFSDK_Widget* pTempWidget = pInterForm->GetWidget(pFormField->GetControl(i))) { |