mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
Support command-click for stream/topic links.
Allow users to open Zulip windows in new tabs with command-click from the left sidebar narrowing links and recipient bar narrowing links. (imported from commit d60c038c7bf1efccd461f5284d513b9cbfbdaebf)
This commit is contained in:
@@ -1208,12 +1208,18 @@ $(function () {
|
||||
}
|
||||
|
||||
$("#home").on("click", ".narrows_by_recipient", function (e) {
|
||||
if (e.metaKey || e.ctrlKey) {
|
||||
return;
|
||||
}
|
||||
e.preventDefault();
|
||||
var row_id = get_row_id_for_narrowing(this);
|
||||
narrow.by_recipient(row_id, {trigger: 'message header'});
|
||||
});
|
||||
|
||||
$("#home").on("click", ".narrows_by_subject", function (e) {
|
||||
if (e.metaKey || e.ctrlKey) {
|
||||
return;
|
||||
}
|
||||
e.preventDefault();
|
||||
var row_id = get_row_id_for_narrowing(this);
|
||||
narrow.by_subject(row_id, {trigger: 'message header'});
|
||||
@@ -1335,6 +1341,9 @@ $(function () {
|
||||
});
|
||||
|
||||
$('#stream_filters li').on('click', '.subscription_block', function (e) {
|
||||
if (e.metaKey || e.ctrlKey) {
|
||||
return;
|
||||
}
|
||||
if (exports.home_tab_obscured()) {
|
||||
ui.change_tab_to('#home');
|
||||
}
|
||||
@@ -1348,6 +1357,9 @@ $(function () {
|
||||
popovers.register_click_handlers();
|
||||
|
||||
$('#stream_filters').on('click', '.subject_box', function (e) {
|
||||
if (e.metaKey || e.ctrlKey) {
|
||||
return;
|
||||
}
|
||||
if (exports.home_tab_obscured()) {
|
||||
ui.change_tab_to('#home');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user