Fix Hiding Stream Creation Prompt on "Enter".

The stream creation prompt would be hidden if someone clicked “Enter”
and the form failed. This is presumably due to some bootstrap magic.
This commit is contained in:
Brock Whittaker 2016-12-13 12:58:11 -08:00 committed by Tim Abbott
parent c77b1b2ac0
commit 65288848b1
1 changed files with 6 additions and 1 deletions

View File

@ -859,7 +859,12 @@ $(function () {
$(".subscriptions").on("click", "[data-dismiss]", function (e) {
e.preventDefault();
show_subs_pane.nothing_selected();
// we want to make sure that the click is not just a simulated
// click; this fixes an issue where hitting "enter" would
// trigger this code path due to bootstrap magic.
if (e.clientY !== 0) {
show_subs_pane.nothing_selected();
}
});
// 'Check all' and 'Uncheck all' links