mirror of https://github.com/zulip/zulip.git
compose: Don't clear compose box on narrow if it matches compose.
If we're entering a topic narrow, and the compose topic is the same as narrowed topic, then leave the compose box open. This is important if you open compose in a topic narrow, click on a narrow, and then use the back button to return to that original narrow. Before this change, we'd close the compose box for no reason. Fixes #6510.
This commit is contained in:
parent
25d9731a3c
commit
dc60b3a44b
|
@ -354,7 +354,12 @@ exports.on_topic_narrow = function () {
|
|||
// appropriate (after all, they were starting to
|
||||
// compose on the old topic and may now be looking
|
||||
// for info), so we punt and cancel.
|
||||
exports.cancel();
|
||||
|
||||
// If subject is not same as topic narrowed to then
|
||||
// stop composing
|
||||
if (compose_state.subject().toLowerCase() !== narrow_state.topic().toLowerCase()) {
|
||||
exports.cancel();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue