settings (streams): Fix data-dismiss handling for stream creation form.

Click handler added for cancel button in stream creation form
incorrectly assumed data-dismiss to be present only in that
form inside `.subscription`. We now handle editing stream
properties like stream privacy and stream name/description
by making use of modal widget. So this assumption creates
a bug where closing these edit modal closes complete stream
edit pane. It was added in 1886f0a015.

We fix this by binding this handler to data-dismiss element
inside stream creation form.
This commit is contained in:
m-e-l-u-h-a-n
2021-06-22 09:09:36 +05:30
committed by Tim Abbott
parent a57aa07a6d
commit c36aa1126c

View File

@@ -996,7 +996,7 @@ export function initialize() {
open_create_stream();
});
$(".subscriptions").on("click", "[data-dismiss]", (e) => {
$(".subscriptions").on("click", "#stream_creation_form [data-dismiss]", (e) => {
e.preventDefault();
// we want to make sure that the click is not just a simulated
// click; this fixes an issue where hitting "Enter" would