summaryrefslogtreecommitdiff
path: root/xfa/fwl/cfwl_edit.cpp
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-04-19 20:52:03 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-19 20:52:03 +0000
commitefb23f332bb3c17c1fa9f4cd5a0cf830d7d63a66 (patch)
tree28fd12e7e22196d2580cefec57a9c5b5bc389f13 /xfa/fwl/cfwl_edit.cpp
parent9914d4dc1e7ad761cd52a68bc8cf64471c297cf8 (diff)
downloadpdfium-efb23f332bb3c17c1fa9f4cd5a0cf830d7d63a66.tar.xz
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 <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'xfa/fwl/cfwl_edit.cpp')
-rw-r--r--xfa/fwl/cfwl_edit.cpp4
1 files changed, 2 insertions, 2 deletions
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)