Skip to content

Commit 418a5f5

Browse files
authored
Merge pull request #682 from GetStream/fix-message-menu-issue-on-fixed-input
fix: use desktop message menu trigger on mixed input devices #680
2 parents 57a3782 + 2fa80ed commit 418a5f5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

projects/stream-chat-angular/src/lib/message/message.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import {
3838
NgxFloatUiLooseDirective,
3939
} from 'ngx-float-ui';
4040
import { TranslateService } from '@ngx-translate/core';
41+
import { isSafari } from '../is-safari';
4142

4243
/**
4344
* The `Message` component displays a message with additional information such as sender and date, and enables [interaction with the message (i.e. edit or react)](/chat/docs/sdk/angular/concepts/message-interactions/).
@@ -98,7 +99,9 @@ export class MessageComponent
9899
};
99100
areMessageOptionsOpen = false;
100101
canDisplayReadStatus = false;
101-
hasTouchSupport = 'ontouchstart' in window || navigator.maxTouchPoints > 0;
102+
hasTouchSupport = isSafari()
103+
? 'ontouchstart' in window || navigator.maxTouchPoints > 0
104+
: window.matchMedia('(any-hover: none)').matches;
102105
private quotedMessageAttachments: Attachment[] | undefined;
103106
private subscriptions: Subscription[] = [];
104107
private isViewInited = false;

0 commit comments

Comments
 (0)