hardlounge/client/components/InlineChannel.vue
itsjohncs 763047889d Remove uses of window.event.
window.event is a deprecated global that's set to the currently
dispatched event.

- Opened and closed mentions box by clicking its icon in the top bar
- Left and right clicked on an inline channel name and saw context menu
  open both times
- Two-finger swiped on iOS and saw channel change
- Long-touched and dragged channel in network list on iOS and reordered
  the list successfully
2021-12-20 15:34:28 -08:00

31 lines
487 B
Vue

<template>
<span
class="inline-channel"
dir="auto"
role="button"
tabindex="0"
@click.prevent="openContextMenu"
@contextmenu.prevent="openContextMenu"
><slot></slot
></span>
</template>
<script>
import eventbus from "../js/eventbus";
export default {
name: "InlineChannel",
props: {
channel: String,
},
methods: {
openContextMenu(event) {
eventbus.emit("contextmenu:inline-channel", {
event: event,
channel: this.channel,
});
},
},
};
</script>