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)
This commit is contained in:
Zev Benjamin 2013-01-04 18:17:45 -05:00
parent 42bf93fb07
commit 9b3e4a8bed
1 changed files with 0 additions and 2 deletions

View File

@ -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"));