File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
packages/mgt-components/src/components
sub-components/mgt-flyout Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -529,6 +529,7 @@ export class MgtPersonCard extends MgtTemplatedTaskComponent implements IHistory
529529
530530 if ( this . _windowHeight < 250 ) {
531531 this . _smallView = true ;
532+ this . fireCustomEvent ( 'smallView' , null , true ) ;
532533 }
533534 const tabLocker = this . lockTabNavigation
534535 ? html `< div @keydown =${ this . handleEndOfCard } aria-label =${ this . strings . endOfCard } tabindex="0" id="end-of-container"> </ div > `
Original file line number Diff line number Diff line change @@ -134,6 +134,13 @@ export class MgtFlyout extends MgtBaseTaskComponent {
134134 this . updateFlyout ( ) ;
135135 } ) ;
136136 } ) ;
137+
138+ // handling when person-card is rendered in a smaller window
139+ this . addEventListener ( 'smallView' , ( ) => {
140+ window . requestAnimationFrame ( ( ) => {
141+ this . updateFlyout ( ) ;
142+ } ) ;
143+ } ) ;
137144 }
138145
139146 /**
@@ -372,7 +379,7 @@ export class MgtFlyout extends MgtBaseTaskComponent {
372379 }
373380 } else {
374381 if ( anchorRect . top + anchorRect . height + flyoutRect . height + this . _edgePadding > windowRect . height ) {
375- // it will render offscreen bellow , move it up a bit
382+ // it will render offscreen below , move it up a bit
376383 top = windowRect . height - flyoutRect . height - this . _edgePadding ;
377384 } else {
378385 top = Math . max ( anchorRect . top + anchorRect . height , this . _edgePadding ) ;
You can’t perform that action at this time.
0 commit comments