Index: gtk/gtkfilechooserdefault.c
===================================================================
--- gtk/gtkfilechooserdefault.c	(revision 19343)
+++ gtk/gtkfilechooserdefault.c	(working copy)
@@ -8195,16 +8195,36 @@
     }
 }
 
-/* Gives the focus to the browse tree view only if it is visible */
+/* Gives the focus to the browse tree view only if it is visible, and if it was used to select a file*/
 static void
 focus_browse_tree_view_if_possible (GtkFileChooserDefault *impl)
 {
+  const char *entry_text;
   gboolean do_focus;
 
   if ((impl->action == GTK_FILE_CHOOSER_ACTION_SAVE ||
        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 if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE
+	     || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
+	     || ((impl->action == GTK_FILE_CHOOSER_ACTION_OPEN
+	          || impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
+	         && impl->location_mode == LOCATION_MODE_FILENAME_ENTRY))
+    {
+      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;
+    }
   else
     do_focus = TRUE;
 
