diff --git a/includes/admin.inc b/includes/admin.inc
index ee7555d..d2bf03d 100644
--- a/includes/admin.inc
+++ b/includes/admin.inc
@@ -912,7 +912,14 @@ function views_ui_edit_page($view, $display_id = NULL) {
   // If the user has enabled the master display, remove 'default' from the url.
   // If the user hasn't enabled the master display redirect to the first other display.
   if (arg(6) == 'default') {
-    drupal_goto("admin/structure/views/view/$view->name/edit");
+    $options = array();
+
+    // Pull any existing destination parameter out of $_GET to prevent a redirect
+    // back to the page on which a contextual edit link was displayed.
+    $options['query'] = drupal_get_destination();
+    unset($_GET['destination']);
+
+    drupal_goto("admin/structure/views/view/$view->name/edit", $options);
   }
 
   $display_id = views_ui_edit_page_display($view, $display_id);
