File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 148
148
}
149
149
150
150
function addMention ( mention ) {
151
+
151
152
var currentMessage = getInputBoxValue ( ) ;
152
153
153
154
// Using a regex to figure out positions
159
160
160
161
var start = currentMessage . substr ( 0 , startCaretPosition ) ;
161
162
var end = currentMessage . substr ( currentCaretPosition , currentMessage . length ) ;
162
- var startEndIndex = ( start + mention . value ) . length ;
163
-
164
- var updatedMessageText = start + mention . value + end ;
163
+ var startEndIndex = ( start + mention . value ) . length + 1 ;
165
164
166
165
mentionsCollection . push ( mention ) ;
167
166
171
170
hideAutoComplete ( ) ;
172
171
173
172
// Mentions & syntax message
173
+ var updatedMessageText = start + mention . value + ' ' + end ;
174
174
elmInputBox . val ( updatedMessageText ) ;
175
175
updateValues ( ) ;
176
176
You can’t perform that action at this time.
0 commit comments