Update CPSearchField.j

This fixes problems with search and cancel buttons, restoring correct behavior and animations.
This commit is contained in:
Didier Korthoudt
2022-04-05 10:37:42 +02:00
parent 3db3f03e5d
commit 3e009bbf26
+7 -2
View File
@@ -122,8 +122,13 @@ var CPAutosavedRecentsChangedNotification = @"CPAutosavedRecentsChangedNotificat
[self setContinuous:YES];
var bounds = [self bounds],
cancelButton = nil, // [[CPButton alloc] initWithFrame:[self cancelButtonRectForBounds:bounds]],
searchButton = nil; // [[CPButton alloc] initWithFrame:[self searchButtonRectForBounds:bounds]];
cancelButton = nil,
searchButton = nil;
#if PLATFORM(DOM)
cancelButton = [[CPButton alloc] initWithFrame:[self cancelButtonRectForBounds:bounds]];
searchButton = [[CPButton alloc] initWithFrame:[self searchButtonRectForBounds:bounds]];
#endif
[self setCancelButton:cancelButton];
[self resetCancelButton];