Skip to content

Commit

Permalink
Merge pull request #682 from GetStream/fix-message-menu-issue-on-fixe…
Browse files Browse the repository at this point in the history
…d-input

fix: use desktop message menu trigger on mixed input devices #680
  • Loading branch information
szuperaz authored Jan 21, 2025
2 parents 57a3782 + 2fa80ed commit 418a5f5
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
NgxFloatUiLooseDirective,
} from 'ngx-float-ui';
import { TranslateService } from '@ngx-translate/core';
import { isSafari } from '../is-safari';

/**
* 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/).
Expand Down Expand Up @@ -98,7 +99,9 @@ export class MessageComponent
};
areMessageOptionsOpen = false;
canDisplayReadStatus = false;
hasTouchSupport = 'ontouchstart' in window || navigator.maxTouchPoints > 0;
hasTouchSupport = isSafari()
? 'ontouchstart' in window || navigator.maxTouchPoints > 0
: window.matchMedia('(any-hover: none)').matches;
private quotedMessageAttachments: Attachment[] | undefined;
private subscriptions: Subscription[] = [];
private isViewInited = false;
Expand Down

0 comments on commit 418a5f5

Please sign in to comment.