Index: gtk/gtkfilechooserdefault.c
===================================================================
--- gtk/gtkfilechooserdefault.c	(revision 19340)
+++ gtk/gtkfilechooserdefault.c	(working copy)
@@ -8205,9 +8205,22 @@
        impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
       && !gtk_expander_get_expanded (GTK_EXPANDER (impl->save_expander)))
     do_focus = FALSE;
+  /* This fixes one bug that caused #419737
+   * Only refocus if the user actually was browsing the tree.
+   * Otherwise files in the tree may get selected.
+   */
   else
-    do_focus = TRUE;
+    {
+      g_assert (impl->location_entry != NULL);
 
+      entry_text = gtk_entry_get_text (GTK_ENTRY (impl->location_entry));
+
+      if (impl->browse_files_last_selected_name)
+        do_focus = (compare_utf8_filenames (impl->browse_files_last_selected_name, entry_text) == 0);
+      else
+        do_focus = FALSE;
+    }
+
   if (do_focus)
     gtk_widget_grab_focus (impl->browse_files_tree_view);
 }
