Fix in-call context menus when in PiP mode (#6552)

Mounting them as children when in PiP mode doesn't work. Condition mounting
the context menus as children of the current component based on whether PiP
mode is active.
This commit is contained in:
Andrew Morgan 2021-08-05 16:33:22 +01:00 committed by GitHub
parent 280c017238
commit df888a1886
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -554,7 +554,11 @@ export default class CallView extends React.Component<IProps, IState> {
ChevronFace.None,
CONTEXT_MENU_VPADDING,
)}
mountAsChild={true}
// We mount the context menus as a as a child typically in order to include the
// context menus when fullscreening the call content.
// However, this does not work as well when the call is embedded in a
// picture-in-picture frame. Thus, only mount as child when we are *not* in PiP.
mountAsChild={!this.props.pipMode}
onFinished={this.closeDialpad}
call={this.props.call}
/>;
@ -568,7 +572,7 @@ export default class CallView extends React.Component<IProps, IState> {
ChevronFace.None,
CONTEXT_MENU_VPADDING,
)}
mountAsChild={true}
mountAsChild={!this.props.pipMode}
onFinished={this.closeContextMenu}
call={this.props.call}
/>;