border-radius: 4px;
background-color: rgba(124, 124, 124, 0.5);
color:transparent;
+ cursor: pointer;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
& > * {
opacity: 0;
}
- &:focus, &:hover {
- background-color: transparent;
- color: inherit;
- user-select: initial;
- & > * {
- opacity: inherit;
- }
+ }
+ .data-mx-spoiler--visible {
+ background-color: var(--bg-surface-active) !important;
+ color: inherit !important;
+ user-select: initial !important;
+ & > * {
+ opacity: inherit !important;
}
-
}
&-edited {
color: var(--tc-surface-low);
}
function handleOnClickCapture(e) {
- const { target } = e;
+ const { target, nativeEvent } = e;
+
const userId = target.getAttribute('data-mx-pill');
- if (!userId) return;
+ if (userId) {
+ const roomId = navigation.selectedRoomId;
+ openProfileViewer(userId, roomId);
+ }
- const roomId = navigation.selectedRoomId;
- openProfileViewer(userId, roomId);
+ const spoiler = nativeEvent.path.find((el) => el?.hasAttribute?.('data-mx-spoiler'));
+ if (spoiler) {
+ spoiler.classList.toggle('data-mx-spoiler--visible');
+ }
}
function renderEvent(roomTimeline, mEvent, prevMEvent, isFocus = false) {