From efb23f332bb3c17c1fa9f4cd5a0cf830d7d63a66 Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Thu, 19 Apr 2018 20:52:03 +0000 Subject: Fix caret not moving to click target in XFA edit. Bug: chromium:832293 Change-Id: Id7b90f7958e71350ecde31ef8891541eb4767ecf Reviewed-on: https://pdfium-review.googlesource.com/31010 Reviewed-by: dsinclair Commit-Queue: Henrique Nakashima --- xfa/fwl/cfwl_edit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xfa/fwl/cfwl_edit.cpp') diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp index 733961eead..871aa3c6bf 100644 --- a/xfa/fwl/cfwl_edit.cpp +++ b/xfa/fwl/cfwl_edit.cpp @@ -1077,7 +1077,7 @@ void CFWL_Edit::DoRButtonDown(CFWL_MessageMouse* pMsg) { if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) == 0) SetFocus(true); - m_CursorPosition = m_EdtEngine.GetIndexForPoint(DeviceToEngine(pMsg->m_pos)); + SetCursorPosition(m_EdtEngine.GetIndexForPoint(DeviceToEngine(pMsg->m_pos))); } void CFWL_Edit::OnFocusChanged(CFWL_Message* pMsg, bool bSet) { @@ -1135,7 +1135,7 @@ void CFWL_Edit::OnLButtonDown(CFWL_MessageMouse* pMsg) { m_EdtEngine.SetSelection(start, end - start); bRepaint = true; } else { - m_CursorPosition = index_at_click; + SetCursorPosition(index_at_click); } if (bRepaint) -- cgit v1.2.3