Fix channel names in context menus

This commit is contained in:
Pavel Djundik 2019-01-02 14:09:50 +02:00
parent 19693bc9b7
commit b02c3b6c17
2 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@
:title="getAriaLabel()" :title="getAriaLabel()"
:data-id="channel.id" :data-id="channel.id"
:data-target="'#chan-' + channel.id" :data-target="'#chan-' + channel.id"
:data-name="channel.name"
:aria-controls="'#chan-' + channel.id" :aria-controls="'#chan-' + channel.id"
:aria-selected="activeChannel && channel === activeChannel.channel" :aria-selected="activeChannel && channel === activeChannel.channel"
class="chan" class="chan"

View File

@ -272,7 +272,7 @@ function addFocusItem() {
addContextMenuItem({ addContextMenuItem({
check: (target) => target.hasClass("chan"), check: (target) => target.hasClass("chan"),
className: getClass, className: getClass,
displayName: (target) => target.attr("aria-label"), displayName: (target) => target.attr("data-name") || target.attr("aria-label"),
data: (target) => target.attr("data-target"), data: (target) => target.attr("data-target"),
callback: focusChan, callback: focusChan,
}); });