diff --git a/assets/chat/css/chat/event-bar/_event-bar-event.scss b/assets/chat/css/chat/event-bar/_event-bar-event.scss index 37bb53f2..bf38cb97 100644 --- a/assets/chat/css/chat/event-bar/_event-bar-event.scss +++ b/assets/chat/css/chat/event-bar/_event-bar-event.scss @@ -12,6 +12,7 @@ border-color: unset; border-width: 2px; margin: a.$gutter-sm; + user-select: none; .event-contents { display: flex; diff --git a/assets/chat/js/event-bar/EventBar.js b/assets/chat/js/event-bar/EventBar.js index 69c5bbbc..057c1067 100644 --- a/assets/chat/js/event-bar/EventBar.js +++ b/assets/chat/js/event-bar/EventBar.js @@ -49,6 +49,13 @@ export default class ChatEventBar extends EventEmitter { this.events.push(event); event.element.addEventListener('click', () => { + if ( + this.eventSelectUI.querySelector(`[data-uuid='${event.data.uuid}']`) + ) { + this.unselect(); + return; + } + this.select(event.selectedElement); }); event.on('eventExpired', this.removeEvent.bind(this)); @@ -59,9 +66,6 @@ export default class ChatEventBar extends EventEmitter { this.eventBarUI.prepend(event.element); - // // Update chat window to fix the scroll position - // this.chat.mainwindow.update(); - // event.startExpiry(); }