Skip to content

Commit

Permalink
Fix device dismiss when new captions come (#3102)
Browse files Browse the repository at this point in the history
* Prevent device contextMenu to be dismissed
  • Loading branch information
PorterNan authored May 26, 2023
1 parent cc96a0d commit 43a3130
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Prevent device contextMenu to be dismissed",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Prevent device contextMenu to be dismissed",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
9 changes: 9 additions & 0 deletions packages/react-components/src/components/DevicesButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@ export const generateDefaultDeviceMenuProps = (
key: 'sectionCamera',
title: strings.cameraMenuTooltip,
subMenuProps: {
calloutProps: {
preventDismissOnEvent
},
items: cameras.map((camera) => ({
key: camera.id,
text: camera.name,
Expand Down Expand Up @@ -320,6 +323,9 @@ export const generateDefaultDeviceMenuProps = (
key: key,
title: title,
subMenuProps: {
calloutProps: {
preventDismissOnEvent
},
items: microphones.map((microphone) => ({
key: microphone.id,
text: microphone.name,
Expand Down Expand Up @@ -353,6 +359,9 @@ export const generateDefaultDeviceMenuProps = (
{
key: 'sectionSpeaker',
subMenuProps: {
calloutProps: {
preventDismissOnEvent
},
items: speakers.map((speaker) => ({
key: speaker.id,
text: speaker.name,
Expand Down

0 comments on commit 43a3130

Please sign in to comment.