FIX: Autocomplete wasn't properly updating d-editor

This commit is contained in:
Robin Ward
2016-03-01 15:16:58 -05:00
parent 8349669f8e
commit 08e43588f6
3 changed files with 9 additions and 0 deletions

View File

@ -146,6 +146,10 @@ export default function(options) {
text = text.substring(0, completeStart) + (options.key || "") + term + ' ' + text.substring(completeEnd + 1, text.length);
me.val(text);
Discourse.Utilities.setCaretPosition(me[0], completeStart + 1 + term.length);
if (options && options.afterComplete) {
options.afterComplete(text);
}
}
}
}