mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
Allow custom action for search button
If there is no menu, and search button has a target/action, then send the action.
This commit is contained in:
@@ -501,7 +501,12 @@ var RECENT_SEARCH_PREFIX = @" ";
|
||||
if (_CGRectContainsPoint([self searchButtonRectForBounds:[self bounds]], point))
|
||||
{
|
||||
if (_searchMenuTemplate == nil)
|
||||
[self _sendAction:self];
|
||||
{
|
||||
if ([_searchButton target] && [_searchButton action])
|
||||
[_searchButton mouseDown:anEvent];
|
||||
else
|
||||
[self _sendAction:self];
|
||||
}
|
||||
else
|
||||
[self _showMenu];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user