From b02c3b6c175a16b116469fdaab4155fd43b1dece Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Wed, 2 Jan 2019 14:09:50 +0200 Subject: [PATCH] Fix channel names in context menus --- client/components/ChannelWrapper.vue | 1 + client/js/contextMenuFactory.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/components/ChannelWrapper.vue b/client/components/ChannelWrapper.vue index 4eed18f3..9962a949 100644 --- a/client/components/ChannelWrapper.vue +++ b/client/components/ChannelWrapper.vue @@ -6,6 +6,7 @@ :title="getAriaLabel()" :data-id="channel.id" :data-target="'#chan-' + channel.id" + :data-name="channel.name" :aria-controls="'#chan-' + channel.id" :aria-selected="activeChannel && channel === activeChannel.channel" class="chan" diff --git a/client/js/contextMenuFactory.js b/client/js/contextMenuFactory.js index 94211f01..c792d42d 100644 --- a/client/js/contextMenuFactory.js +++ b/client/js/contextMenuFactory.js @@ -272,7 +272,7 @@ function addFocusItem() { addContextMenuItem({ check: (target) => target.hasClass("chan"), className: getClass, - displayName: (target) => target.attr("aria-label"), + displayName: (target) => target.attr("data-name") || target.attr("aria-label"), data: (target) => target.attr("data-target"), callback: focusChan, });