mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-03 03:24:22 +00:00
Fixed: the userInfo of the notification from textDidEndEditing is wrong
Previously, when overriding the method textDidEndEditing, the userInfo notification didn't contain the information about CPTextMovement
This commit is contained in:
1 parent
ebc1025fd9
commit
7f53d15e75
3 files changed
+4
-4
No files matched your search
+1
-1
@@ -627,7 +627,7 @@ var CPControlBlackColor = [CPColor blackColor];
|
||||
|
||||
[self _reverseSetBinding];
|
||||
|
||||
[[CPNotificationCenter defaultCenter] postNotificationName:CPControlTextDidEndEditingNotification object:self userInfo:@{ "CPTextMovement": [self _currentTextMovement] }];
|
||||
[[CPNotificationCenter defaultCenter] postNotificationName:CPControlTextDidEndEditingNotification object:self userInfo:[note userInfo]];
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -721,7 +721,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
|
||||
_isEditing = NO;
|
||||
if ([self isEditable])
|
||||
{
|
||||
[self textDidEndEditing:[CPNotification notificationWithName:CPControlTextDidEndEditingNotification object:self userInfo:nil]];
|
||||
[self textDidEndEditing:[CPNotification notificationWithName:CPControlTextDidEndEditingNotification object:self userInfo:@{ "CPTextMovement": [self _currentTextMovement] }]];
|
||||
|
||||
if ([self sendsActionOnEndEditing])
|
||||
[self sendAction:[self action] to:[self target]];
|
||||
@@ -987,7 +987,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
|
||||
if (_isEditing)
|
||||
{
|
||||
_isEditing = NO;
|
||||
[self textDidEndEditing:[CPNotification notificationWithName:CPControlTextDidEndEditingNotification object:self userInfo:nil]];
|
||||
[self textDidEndEditing:[CPNotification notificationWithName:CPControlTextDidEndEditingNotification object:self userInfo:@{ "CPTextMovement": [self _currentTextMovement] }]];
|
||||
}
|
||||
|
||||
// If there is no target action, or the sendAction call returns
|
||||
|
||||
@@ -428,7 +428,7 @@ CPTokenFieldDeleteButtonType = 1;
|
||||
if (_shouldNotifyTarget)
|
||||
{
|
||||
_shouldNotifyTarget = NO;
|
||||
[self textDidEndEditing:[CPNotification notificationWithName:CPControlTextDidEndEditingNotification object:self userInfo:nil]];
|
||||
[self textDidEndEditing:[CPNotification notificationWithName:CPControlTextDidEndEditingNotification object:self userInfo:@{ "CPTextMovement": [self _currentTextMovement] }]];
|
||||
|
||||
if ([self sendsActionOnEndEditing])
|
||||
[self sendAction:[self action] to:[self target]];
|
||||
|
||||
Reference in new issue
Block a user