Index: lib/widgets/ephy-node-view.c
===================================================================
--- lib/widgets/ephy-node-view.c	(revision 8572)
+++ lib/widgets/ephy-node-view.c	(working copy)
@@ -682,7 +682,16 @@ did_not_drag (EphyNodeView *view,
 			}
 
                         gtk_tree_selection_select_path (selection, path);
-                }
+			
+			if (event->button == 2)
+			{
+				EphyNode *clicked_node;
+				
+				clicked_node = process_middle_click (path, view);
+				g_signal_emit (G_OBJECT (view),
+				       ephy_node_view_signals[NODE_MIDDLE_CLICKED], 0, clicked_node);
+			}
+		}
                                                                                                                               
                 gtk_tree_path_free (path);
         }                                                                                                              
@@ -756,7 +765,7 @@ drag_data_get_cb (GtkWidget *widget,
 }
 
 static gboolean
-button_release_cb (GtkWidget *widget,
+ephy_node_view_button_release_cb (GtkWidget *widget,
                    GdkEventButton *event,
                    EphyNodeView *view)
 {
@@ -848,7 +857,7 @@ ephy_node_view_button_press_cb (GtkWidge
 		}
 
 		if(!button_event_modifies_selection (event) &&
-                   event->button == 1 && path_is_selected &&
+                   (event->button == 1 || event->button == 2) && path_is_selected &&
 		   gtk_tree_selection_count_selected_rows (selection) > 1)
 		{
                         call_parent = FALSE;
@@ -865,15 +874,7 @@ ephy_node_view_button_press_cb (GtkWidge
 
 			g_signal_emit_by_name (view, "popup_menu", &retval);
 		}
-		else if (event->button == 2)
-		{
-			EphyNode *clicked_node;
-			
-			clicked_node = process_middle_click (path, view);
-			g_signal_emit (G_OBJECT (view),
-				       ephy_node_view_signals[NODE_MIDDLE_CLICKED], 0, clicked_node);
-		}
-		else if (event->button == 1)
+		else if (event->button == 1 || event->button == 2)
 		{
 			if (view->priv->toggle_column >= 0)
 			{
@@ -1517,11 +1518,6 @@ ephy_node_view_enable_drag_source (EphyN
 					               extra_drag_column);
 
 	g_signal_connect_object (G_OBJECT (view),
-			         "button_release_event",
-			         G_CALLBACK (button_release_cb),
-			         view,
-				 0);
-	g_signal_connect_object (G_OBJECT (view),
 			         "motion_notify_event",
 			         G_CALLBACK (motion_notify_cb),
 			         view,
@@ -1612,6 +1608,10 @@ ephy_node_view_constructor (GType type, 
 	g_signal_connect_object (object, "button_press_event",
 			         G_CALLBACK (ephy_node_view_button_press_cb),
 			         view, 0);
+	g_signal_connect_object (object,
+			         "button_release_event",
+			         G_CALLBACK (ephy_node_view_button_release_cb),
+			         view, 0);
 	g_signal_connect (object, "key_press_event",
 			  G_CALLBACK (ephy_node_view_key_press_cb),
 			  view);
