summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/Field.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/javascript/Field.cpp')
-rw-r--r--fpdfsdk/javascript/Field.cpp3
1 files changed, 2 insertions, 1 deletions
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))) {