@@ -38,7 +38,7 @@ import IconizedContextMenu, {
38
38
IconizedContextMenuOption ,
39
39
IconizedContextMenuOptionList ,
40
40
} from "../context_menus/IconizedContextMenu" ;
41
- import { aboveLeftOf , ContextMenuButton , useContextMenu } from "../../structures/ContextMenu" ;
41
+ import { aboveRightOf , ContextMenuButton , useContextMenu } from "../../structures/ContextMenu" ;
42
42
import { Alignment } from "../elements/Tooltip" ;
43
43
import { ButtonEvent } from "../elements/AccessibleButton" ;
44
44
import AccessibleTooltipButton from "../elements/AccessibleTooltipButton" ;
@@ -81,7 +81,7 @@ const DeviceButton: FC<DeviceButtonProps> = ({
81
81
if ( showMenu ) {
82
82
const buttonRect = buttonRef . current ! . getBoundingClientRect ( ) ;
83
83
contextMenu = (
84
- < IconizedContextMenu { ...aboveLeftOf ( buttonRect ) } onFinished = { closeMenu } >
84
+ < IconizedContextMenu { ...aboveRightOf ( buttonRect , undefined , 10 ) } onFinished = { closeMenu } >
85
85
< IconizedContextMenuOptionList >
86
86
{ devices . map ( ( d ) => (
87
87
< IconizedContextMenuOption key = { d . deviceId } label = { d . label } onClick = { ( ) => selectDevice ( d ) } />
@@ -101,6 +101,7 @@ const DeviceButton: FC<DeviceButtonProps> = ({
101
101
>
102
102
< AccessibleTooltipButton
103
103
className = { `mx_CallView_deviceButton mx_CallView_deviceButton_${ kind } ` }
104
+ inputRef = { buttonRef }
104
105
title = { muted ? mutedTitle : unmutedTitle }
105
106
alignment = { Alignment . Top }
106
107
onClick = { toggle }
@@ -109,7 +110,6 @@ const DeviceButton: FC<DeviceButtonProps> = ({
109
110
{ devices . length > 1 ? (
110
111
< ContextMenuButton
111
112
className = "mx_CallView_deviceListButton"
112
- inputRef = { buttonRef }
113
113
onClick = { openMenu }
114
114
isExpanded = { showMenu }
115
115
label = { deviceListLabel }
0 commit comments