Index: xfa/fwl/core/ifwl_form.cpp |
diff --git a/xfa/fwl/core/ifwl_form.cpp b/xfa/fwl/core/ifwl_form.cpp |
index e46328b634c08912ecce318259e3a509dfb26319..2ded30e6d682289ab4a30d31c97ece58a1ce1f00 100644 |
--- a/xfa/fwl/core/ifwl_form.cpp |
+++ b/xfa/fwl/core/ifwl_form.cpp |
@@ -830,10 +830,11 @@ void CFWL_FormImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { |
if (pSubFocus == pDriver->GetFocus()) { |
pDriver->SetFocus(nullptr); |
} else if (pSubFocus->GetStates() & FWL_WGTSTATE_Focused) { |
- CFWL_MsgKillFocus ms; |
- IFWL_WidgetDelegate* pDelegate = pSubFocus->SetDelegate(nullptr); |
- if (pDelegate) |
+ if (IFWL_WidgetDelegate* pDelegate = |
+ pSubFocus->GetCurrentDelegate()) { |
+ CFWL_MsgKillFocus ms; |
pDelegate->OnProcessMessage(&ms); |
+ } |
} |
} |
m_pOwner->Repaint(&m_pOwner->m_rtRelative); |