From 9b3e4a8bed01a01a5c810b734e5ac176c064125e Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Fri, 4 Jan 2013 18:17:45 -0500 Subject: [PATCH] Don't focus the new stream box after sucessfully subscribing or unsubscribing If you have a lot of subscriptions that you're trying to modify, jumping back up to the top of the page is very disruptive. We still show the success message, which has the effect of scrolling the page and is thus surprising, but that's better than the user completely losing their place. We do need a story for informing users about failures to subscribe or unsubscribe, though. We currently jump back to the top so they can see the error, but that's not optimal. (imported from commit 48d938ddc47f286a72e2147f4459b91ca5684e36) --- zephyr/static/js/subs.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/zephyr/static/js/subs.js b/zephyr/static/js/subs.js index f2fb7caf2d..9ed4cc8d2c 100644 --- a/zephyr/static/js/subs.js +++ b/zephyr/static/js/subs.js @@ -228,7 +228,6 @@ function ajaxSubscribe(stream) { $("#subscriptions-status")); } add_to_stream_list(name); - $("#streams").focus(); }, error: function (xhr) { ui.report_error("Error adding subscription", xhr, $("#subscriptions-status")); @@ -268,7 +267,6 @@ exports.unsubscribe_button_click = function (e) { }); remove_from_stream_list(name); typeahead_helper.update_autocomplete(); - $("#streams").focus(); }, error: function (xhr) { ui.report_error("Error removing subscription", xhr, $("#subscriptions-status"));