Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
keyboard ui: Add early-exit to click handlers with shift.
Olivier FAURE29e32c39779f
diff --git a/web/src/click_handlers.js b/web/src/click_handlers.jsindex 60f974f81ef..437b684ccc3 100644--- a/web/src/click_handlers.js+++ b/web/src/click_handlers.js@@ -464,7 +464,7 @@ export function initialize() {}$("#message_feed_container").on("click", ".narrows_by_recipient", function (e) {- if (e.metaKey || e.ctrlKey) {+ if (e.metaKey || e.ctrlKey || e.shiftKey) {return;}e.preventDefault();@@ -473,7 +473,7 @@ export function initialize() {});$("#message_feed_container").on("click", ".narrows_by_topic", function (e) {- if (e.metaKey || e.ctrlKey) {+ if (e.metaKey || e.ctrlKey || e.shiftKey) {return;}e.preventDefault();@@ -483,7 +483,7 @@ export function initialize() {// SIDEBARS$(".buddy-list-section").on("click", ".selectable_sidebar_block", (e) => {- if (e.metaKey || e.ctrlKey) {+ if (e.metaKey || e.ctrlKey || e.shiftKey) {return;}@@ -845,7 +845,7 @@ export function initialize() {});$("body").on("click", "#header-container .brand", (e) => {- if (e.metaKey || e.ctrlKey) {+ if (e.metaKey || e.ctrlKey || e.shiftKey) {return;}diff --git a/web/src/inbox_ui.js b/web/src/inbox_ui.jsindex 92acf51bc99..daba7dbde19 100644--- a/web/src/inbox_ui.js+++ b/web/src/inbox_ui.js@@ -1307,7 +1307,7 @@ export function initialize() {});$("body").on("click", "#inbox-list .inbox-left-part-wrapper", (e) => {- if (e.metaKey || e.ctrlKey) {+ if (e.metaKey || e.ctrlKey || e.shiftKey) {return;}diff --git a/web/src/recent_view_ui.js b/web/src/recent_view_ui.jsindex 2a13ea18d49..f8ab76829c8 100644--- a/web/src/recent_view_ui.js+++ b/web/src/recent_view_ui.js@@ -1548,7 +1548,7 @@ export function initialize({});$("body").on("click", "td.recent_topic_stream", (e) => {- if (e.metaKey || e.ctrlKey) {+ if (e.metaKey || e.ctrlKey || e.shiftKey) {return;}@@ -1559,7 +1559,7 @@ export function initialize({});$("body").on("click", "td.recent_topic_name", (e) => {- if (e.metaKey || e.ctrlKey) {+ if (e.metaKey || e.ctrlKey || e.shiftKey) {return;}diff --git a/web/src/stream_list.ts b/web/src/stream_list.tsindex 9a7fcefa91a..7e15b3827a9 100644--- a/web/src/stream_list.ts+++ b/web/src/stream_list.ts@@ -823,7 +823,7 @@ export function set_event_handlers({on_stream_click: (stream_id: number, trigger: string) => void;}): void {$("#stream_filters").on("click", "li .subscription_block", (e) => {- if (e.metaKey || e.ctrlKey) {+ if (e.metaKey || e.ctrlKey || e.shiftKey) {return;}const stream_id = stream_id_for_elt($(e.target).parents("li"));diff --git a/web/src/topic_list.ts b/web/src/topic_list.tsindex ad22c5f90d3..ded244b7748 100644--- a/web/src/topic_list.ts+++ b/web/src/topic_list.ts@@ -339,7 +339,7 @@ export function initialize({"click",".sidebar-topic-check, .topic-name, .topic-markers-and-controls",(e) => {- if (e.metaKey || e.ctrlKey) {+ if (e.metaKey || e.ctrlKey || e.shiftKey) {return;}if ($(e.target).closest(".show-more-topics").length > 0) {