mirror of https://github.com/zulip/zulip.git
popovers: Close user popover when clicked on stream name.
Earlier, when a user clicked on any stream name from the user_popover, the stream page would open in the background, but the user popover wouldn't close. Fixed it by explicitly binding it to a click handler, which closes the user popover before redirecting to stream page.
This commit is contained in:
parent
4cff56a47c
commit
8cd9fc7a74
|
@ -1132,10 +1132,17 @@ export function register_click_handlers() {
|
|||
e.preventDefault();
|
||||
});
|
||||
|
||||
/* These click handlers are implemented as just deep links to the
|
||||
* relevant part of the Zulip UI, so we don't want preventDefault,
|
||||
* but we do want to close the modal when you click them. */
|
||||
$("body").on("click", "#user-profile-modal #name #edit-button", () => {
|
||||
hide_user_profile();
|
||||
});
|
||||
|
||||
$("body").on("click", "#user-profile-modal .stream_list_item", () => {
|
||||
hide_user_profile();
|
||||
});
|
||||
|
||||
$("body").on("click", ".compose_mobile_button", function (e) {
|
||||
show_mobile_message_buttons_popover(this);
|
||||
e.stopPropagation();
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
<span id="stream_sidebar_privacy_swatch_{{stream_id}}" class="stream-privacy filter-icon" style="color: {{stream_color}}">
|
||||
{{> stream_privacy }}
|
||||
</span>
|
||||
<a href="{{stream_edit_url}}">{{name}}</a>
|
||||
<a class = "stream_list_item" href="{{stream_edit_url}}">{{name}}</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue