Place the cursor after the last inserted token when editing.

This commit is contained in:
Alexander Ljungberg committed 2010-10-23 17:09:46 -03:00
1 parent 8a7b6054ef
commit 0c2301766a
1 file changed
+2 -1
+2 -1
View File
@@ -202,8 +202,9 @@ var CPThemeStateAutoCompleting = @"CPThemeStateAutoCompleting",
[objectValue removeObjectAtIndex:_selectedRange.location];
[objectValue insertObject:token atIndex:_selectedRange.location];
var location = _selectedRange.location;
[self setObjectValue:objectValue];
_shouldScrollTo = CPScrollDestinationNone;
_selectedRange = CPMakeRange(location + 1, 0);
[self _inputElement].value = @"";
[self setNeedsLayout];