mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
left_sidebar: Improve text selection for channel names.
Fixes: https://chat.zulip.org/#narrow/channel/9-issues/topic/.E2.9C.94.20.F0.9F.8E.AF.20focus.20bug.20with.20.22first.20unread.22.20channel.20click.20policy/near/2222421. Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
This commit is contained in:
committed by
Tim Abbott
parent
ab01079f40
commit
1001c0d60a
@@ -1256,6 +1256,11 @@ export function set_event_handlers({
|
||||
if (e.metaKey || e.ctrlKey || e.shiftKey) {
|
||||
return;
|
||||
}
|
||||
if (document.getSelection()?.type === "Range") {
|
||||
// To avoid the click behavior if a channel name is selected.
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
const stream_id = stream_id_for_elt($(e.target).parents("li.narrow-filter"));
|
||||
on_sidebar_channel_click(stream_id, e, show_channel_feed);
|
||||
|
@@ -1549,6 +1549,7 @@ li.active-sub-filter {
|
||||
}
|
||||
|
||||
.subscription_block {
|
||||
user-select: text;
|
||||
grid-template-columns:
|
||||
var(--left-sidebar-toggle-width-offset) var(
|
||||
--left-sidebar-icon-column-width
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
<li class="narrow-filter{{#if is_muted}} out_of_home_view{{/if}}" data-stream-id="{{id}}">
|
||||
<div class="bottom_left_row">
|
||||
<a href="{{url}}" class="subscription_block selectable_sidebar_block">
|
||||
<a href="{{url}}" class="subscription_block selectable_sidebar_block" draggable="false">
|
||||
|
||||
<span class="stream-privacy-original-color-{{id}} stream-privacy filter-icon" style="color: {{color}}">
|
||||
{{> stream_privacy . }}
|
||||
|
Reference in New Issue
Block a user