From e06686dbf4173e5f1af672209037642166ac0ba5 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 3 Aug 2017 19:40:53 -0500 Subject: fix caret position after autocomplete (#7118) --- webapp/components/suggestion/suggestion_box.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'webapp/components') diff --git a/webapp/components/suggestion/suggestion_box.jsx b/webapp/components/suggestion/suggestion_box.jsx index 008fc2ffb..11fda2643 100644 --- a/webapp/components/suggestion/suggestion_box.jsx +++ b/webapp/components/suggestion/suggestion_box.jsx @@ -275,7 +275,7 @@ export default class SuggestionBox extends React.Component { // set the caret position after the next rendering window.requestAnimationFrame(() => { if (textbox.value === newValue) { - Utils.setCaretPosition(textbox, newValue.length); + Utils.setCaretPosition(textbox, prefix.length + term.length + 1); } }); -- cgit v1.2.3-1-g7c22