mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-06 02:43:40 +00:00
Merge pull request #3194 from daboe01/fixed-CPTokenField-autocomplete-does-not-work-when-placed-in-toolbar
fixed: CPTokenField autocomplete when placed in a CPToolbar
This commit is contained in:
@@ -551,7 +551,7 @@ CPTokenFieldDeleteButtonType = 1;
|
||||
CPTokenFieldCachedDragFunction = nil;
|
||||
|
||||
document.body.ondrag = CPTokenFieldCachedDragFunction;
|
||||
document.body.onselectstart = CPTokenFieldCachedSelectStartFunction
|
||||
document.body.onselectstart = CPTokenFieldCachedSelectStartFunction;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1021,6 +1021,22 @@ var LABEL_MARGIN = 2.0;
|
||||
BOOL _FIXME_isHUD;
|
||||
}
|
||||
|
||||
- (BOOL)acceptsFirstResponder
|
||||
{
|
||||
if (_view && [_view acceptsFirstResponder])
|
||||
return YES;
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)becomeFirstResponder
|
||||
{
|
||||
if (_view && [_view acceptsFirstResponder])
|
||||
return [[self window] makeFirstResponder:_view];
|
||||
|
||||
return [super becomeFirstResponder];
|
||||
}
|
||||
|
||||
- (id)initWithToolbarItem:(CPToolbarItem)aToolbarItem toolbar:(CPToolbar)aToolbar
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
Reference in New Issue
Block a user