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:
Antoine Mercadal
2012-10-05 17:58:54 -07:00
parent a337bc28f9
commit 1edcc511d6
+6 -1
View File
@@ -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];
}