Skip to content

Commit 5e46898

Browse files
Disable the selectivity of a text in video gallery for long touch to function properly (#2790)
* disable the selectivity of a text in video gallery for long touch to function properly * Change files * Duplicate change files for beta release
1 parent 90d3f0b commit 5e46898

3 files changed

Lines changed: 27 additions & 1 deletion

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "disable the selectivity of a text in video gallery for long touch to function properly",
4+
"packageName": "@azure/communication-react",
5+
"email": "97124699+prabhjot-msft@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "disable the selectivity of a text in video gallery for long touch to function properly",
4+
"packageName": "@azure/communication-react",
5+
"email": "97124699+prabhjot-msft@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}

packages/react-components/src/components/VideoGallery.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@ import { useId } from '@fluentui/react-hooks';
4242
* Currently the Calling JS SDK supports up to 4 remote video streams
4343
*/
4444
export const DEFAULT_MAX_REMOTE_VIDEO_STREAMS = 4;
45+
46+
/**
47+
* @private
48+
* Styles to disable the selectivity of a text in video gallery
49+
*/
50+
export const unselectable = {
51+
'-webkit-user-select': 'none',
52+
'-webkit-touch-callout': 'none',
53+
'-moz-user-select': 'none',
54+
'-ms-user-select': 'none',
55+
'user-select': 'none'
56+
};
4557
/**
4658
* @private
4759
* Set aside only 6 dominant speakers for remaining audio participants
@@ -568,7 +580,7 @@ export const VideoGallery = (props: VideoGalleryProps): JSX.Element => {
568580
id={drawerMenuHostIdFromProp ? undefined : drawerMenuHostId}
569581
data-ui-id={ids.videoGallery}
570582
ref={containerRef}
571-
className={mergeStyles(videoGalleryOuterDivStyle, styles?.root)}
583+
className={mergeStyles(videoGalleryOuterDivStyle, styles?.root, unselectable)}
572584
>
573585
{videoGalleryLayout}
574586
{

0 commit comments

Comments
 (0)