mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 01:56:01 -05:00
FIX: regression in autocomplete
This commit is contained in:
parent
737be5e151
commit
b4c29a9f3b
1 changed files with 1 additions and 3 deletions
|
@ -261,10 +261,8 @@ export default function(options) {
|
|||
$(this).keypress(function(e) {
|
||||
var caretPosition, term;
|
||||
|
||||
if (!options.key) return;
|
||||
|
||||
// keep hunting backwards till you hit a the @ key
|
||||
if (e.which === options.key.charCodeAt(0)) {
|
||||
if (options.key && e.which === options.key.charCodeAt(0)) {
|
||||
caretPosition = Discourse.Utilities.caretPosition(me[0]);
|
||||
var prevChar = me.val().charAt(caretPosition - 1);
|
||||
if (!prevChar || /\s/.test(prevChar)) {
|
||||
|
|
Loading…
Reference in a new issue