From 63aef279f52a4e2f233b6d3d6ffa367d6074da29 Mon Sep 17 00:00:00 2001 From: "stuart.morgan%alumni.case.edu" Date: Sat, 23 Feb 2008 19:44:04 +0000 Subject: [PATCH] Camino only - Bug 419051: Only re-focus the search field when it's not already focused. r/sr=pink git-svn-id: svn://10.0.0.236/trunk@246378 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/camino/src/find/FindBarController.mm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mozilla/camino/src/find/FindBarController.mm b/mozilla/camino/src/find/FindBarController.mm index 9119261e42f..fb039508182 100644 --- a/mozilla/camino/src/find/FindBarController.mm +++ b/mozilla/camino/src/find/FindBarController.mm @@ -148,8 +148,13 @@ { [self doFindForwards:YES]; // Return/enter ends editing and unfocuses the search field, which we don't - // want. Rather than setting up a custom field editor, just force focus back. - [[mSearchField window] makeFirstResponder:mSearchField]; + // want. Rather than setting up a custom field editor, just force focus back + // if it's not focused. + if (![mSearchField currentEditor] || + [[mSearchField window] firstResponder] != [mSearchField currentEditor]) + { + [[mSearchField window] makeFirstResponder:mSearchField]; + } } - (IBAction)findPrevious:(id)sender