Skip to content

Commit

Permalink
[Chat] Fixing zoom on image in image gallery (#3515)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaLai authored Aug 28, 2023
1 parent 3daf21d commit 4079ed8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "none",
"area": "fix",
"workstream": "Image Gallery",
"comment": "Fix image gallery double click to use default behaviour",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "none",
"area": "fix",
"workstream": "Image Gallery",
"comment": "Fix image gallery double click to use default behaviour",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "none"
}
5 changes: 4 additions & 1 deletion packages/react-components/src/components/ImageGallery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,15 @@ export const ImageGallery = (props: ImageGalleryProps): JSX.Element => {
className={mergeStyles(imageStyle)}
alt={image.altText || 'image'}
aria-label={'image-gallery-main-image'}
aria-live={'polite'}
onError={(event) => {
setIsImageLoaded(false);
onError && onError(event);
}}
onClick={(event) => event.stopPropagation()}
aria-live={'polite'}
onDoubleClick={(event) => {
event.persist();
}}
/>
</FocusTrapZone>
</Stack>
Expand Down

0 comments on commit 4079ed8

Please sign in to comment.