diff --git a/src/com/android/contacts/activities/ActionBarAdapter.java b/src/com/android/contacts/activities/ActionBarAdapter.java
index 37cb9c5..dbdb1f0 100644
--- a/src/com/android/contacts/activities/ActionBarAdapter.java
+++ b/src/com/android/contacts/activities/ActionBarAdapter.java
@@ -28,6 +28,7 @@
 import android.text.TextUtils;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.view.View.OnFocusChangeListener;
 import android.widget.SearchView;
 import android.widget.SearchView.OnCloseListener;
 import android.widget.SearchView.OnQueryChangeListener;
@@ -36,8 +37,8 @@
 /**
  * Adapter for the action bar at the top of the Contacts activity.
  */
-public class ActionBarAdapter
-        implements OnQueryChangeListener, OnCloseListener, ContactListFilterListener {
+public class ActionBarAdapter implements OnQueryChangeListener, OnCloseListener,
+        ContactListFilterListener, OnFocusChangeListener {
 
     public interface Listener {
         void onAction();
@@ -94,6 +95,7 @@
         mSearchView.setIconifiedByDefault(false);
         mSearchView.setOnQueryChangeListener(this);
         mSearchView.setOnCloseListener(this);
+        mSearchView.setOnQueryTextFocusChangeListener(this);
         mSearchView.setQuery(mQueryString, false);
 
         update();
@@ -109,6 +111,13 @@
         mFilterController.addListener(this);
     }
 
+    @Override
+    public void onFocusChange(View v, boolean hasFocus) {
+        if (v == mSearchView) {
+            setSearchMode(hasFocus);
+        }
+    }
+
     public boolean isSearchMode() {
         return mSearchMode;
     }
@@ -119,6 +128,8 @@
             update();
             if (mSearchMode) {
                 mSearchView.requestFocus();
+            } else {
+                mSearchView.setQuery(null, false);
             }
             if (mListener != null) {
                 mListener.onAction();
@@ -162,15 +173,14 @@
     @Override
     public boolean onQueryTextChanged(String queryString) {
         mQueryString = queryString;
-        boolean searchMode = !TextUtils.isEmpty(queryString);
-        if (searchMode == mSearchMode) {
-            update();
-            if (mListener != null) {
-                mListener.onAction();
+        if (!mSearchMode) {
+            if (!TextUtils.isEmpty(queryString)) {
+                setSearchMode(true);
             }
-        } else {
-            setSearchMode(searchMode);
+        } else if (mListener != null) {
+            mListener.onAction();
         }
+
         return true;
     }
 
diff --git a/src/com/android/contacts/activities/ContactBrowserActivity.java b/src/com/android/contacts/activities/ContactBrowserActivity.java
index 054c50f..1c1f9b2 100644
--- a/src/com/android/contacts/activities/ContactBrowserActivity.java
+++ b/src/com/android/contacts/activities/ContactBrowserActivity.java
@@ -291,6 +291,7 @@
                 mListFragment = createContactSearchFragment();
             } else {
                 mListFragment = createListFragment(ContactsRequest.ACTION_DEFAULT);
+                mListFragment.requestSelectionOnScreen(false);
             }
         }
 
@@ -932,6 +933,15 @@
         return super.onKeyDown(keyCode, event);
     }
 
+    @Override
+    public void onBackPressed() {
+        if (mSearchMode && mActionBarAdapter != null) {
+            mActionBarAdapter.setSearchMode(false);
+        } else {
+            super.onBackPressed();
+        }
+    }
+
     private boolean deleteSelection() {
         // TODO move to the fragment
 //        if (mActionCode == ContactsRequest.ACTION_DEFAULT) {
