Make token field object value more like Cocoa.

If a half typed token is in the field, Cocoa tries to convert it to a representedObject before responding to objectValue. Now CPTokenField does the same.
This commit is contained in:
Alexander Ljungberg committed 2012-06-16 12:31:49 +01:00
1 parent fb404a0671
commit 3eab2a528f
1 file changed
+3
+3
View File
@@ -485,7 +485,10 @@ var CPScrollDestinationNone = 0,
#if PLATFORM(DOM)
if ([self _inputElement].value != @"")
{
var token = [self _representedObjectForEditingString:[self _inputElement].value];
[objectValue insertObject:[self _inputElement].value atIndex:_selectedRange.location];
}
#endif