@@ -12,7 +12,7 @@ import {
1212 Stack ,
1313 Text
1414} from '@fluentui/react' ;
15- import React , { useLayoutEffect , useMemo , useRef , useState } from 'react' ;
15+ import React , { useEffect , useLayoutEffect , useMemo , useRef , useState } from 'react' ;
1616import { useIdentifiers } from '../identifiers' ;
1717import { ComponentLocale , useLocale } from '../localization' ;
1818import { useTheme } from '../theming' ;
@@ -296,6 +296,36 @@ export const VideoTile = (props: VideoTileProps): JSX.Element => {
296296 return ( ) => currentObserver . disconnect ( ) ;
297297 } , [ videoTileRef ] ) ;
298298
299+ /* @conditional -compile-remove(ppt-live) */
300+ // TODO: Remove after calling sdk fix the keybaord focus
301+ useEffect ( ( ) => {
302+ // PPTLive display name is undefined, return as it is not screen share
303+ if ( displayName !== undefined ) {
304+ return ;
305+ }
306+ let observer : MutationObserver | undefined ;
307+ if ( videoTileRef . current ) {
308+ observer = new MutationObserver ( ( mutationsList ) => {
309+ for ( const mutation of mutationsList ) {
310+ if ( mutation . type === 'childList' ) {
311+ const iframe = document . querySelector ( 'iframe' ) ;
312+ if ( iframe ) {
313+ if ( ! iframe . getAttribute ( 'tabIndex' ) ) {
314+ iframe . setAttribute ( 'tabIndex' , '-1' ) ;
315+ }
316+ }
317+ }
318+ }
319+ } ) ;
320+
321+ observer . observe ( videoTileRef . current , { childList : true , subtree : true } ) ;
322+ }
323+
324+ return ( ) => {
325+ observer ?. disconnect ( ) ;
326+ } ;
327+ } , [ displayName , renderElement ] ) ;
328+
299329 const useLongPressProps = useMemo ( ( ) => {
300330 return {
301331 onLongPress : ( ) => {
0 commit comments