web/timeline: disable right click context menu on videos

Signed-off-by: Sumner Evans <me@sumnerevans.com>
This commit is contained in:
Sumner Evans 2025-01-08 10:44:42 -07:00
parent 31bc7a6f24
commit 9159aa67e3
No known key found for this signature in database

View file

@ -87,6 +87,7 @@ const TimelineEvent = ({ evt, prevEvt, disableMenu, smallReplies, isFocused }: T
!roomCtx.store.preferences.message_context_menu !roomCtx.store.preferences.message_context_menu
|| targetElem.tagName === "A" || targetElem.tagName === "A"
|| targetElem.tagName === "IMG" || targetElem.tagName === "IMG"
|| targetElem.tagName === "VIDEO"
|| window.getSelection()?.type === "Range" || window.getSelection()?.type === "Range"
) { ) {
return return