summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller/cffl_textfield.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/formfiller/cffl_textfield.cpp')
-rw-r--r--fpdfsdk/formfiller/cffl_textfield.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/fpdfsdk/formfiller/cffl_textfield.cpp b/fpdfsdk/formfiller/cffl_textfield.cpp
index a54939666f..fbbc63763b 100644
--- a/fpdfsdk/formfiller/cffl_textfield.cpp
+++ b/fpdfsdk/formfiller/cffl_textfield.cpp
@@ -74,7 +74,9 @@ std::unique_ptr<CPWL_Wnd> CFFL_TextField::NewPWLWindow(
std::unique_ptr<CPWL_Wnd::PrivateData> pAttachedData) {
auto pWnd = pdfium::MakeUnique<CPWL_Edit>(std::move(pAttachedData));
pWnd->AttachFFLData(this);
- pWnd->Create(cp);
+ if (cp.pParentWnd)
+ cp.pParentWnd->AddChild(pWnd.get());
+ pWnd->Realize(cp);
pWnd->SetFillerNotify(m_pFormFillEnv->GetInteractiveFormFiller());
int32_t nMaxLen = m_pWidget->GetMaxLen();