Skip to content

Commit

Permalink
Merge branch 'main' into fix/bug-3307
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnickii authored Oct 2, 2024
2 parents 92894eb + ae49332 commit f799f3a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ export class MgtPersonCard extends MgtTemplatedTaskComponent implements IHistory

if (this._windowHeight < 250) {
this._smallView = true;
this.fireCustomEvent('smallView', null, true);
}
const tabLocker = this.lockTabNavigation
? html`<div @keydown=${this.handleEndOfCard} aria-label=${this.strings.endOfCard} tabindex="0" id="end-of-container"></div>`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ export class MgtFlyout extends MgtBaseTaskComponent {
this.updateFlyout();
});
});

// handling when person-card is rendered in a smaller window
this.addEventListener('smallView', () => {
window.requestAnimationFrame(() => {
this.updateFlyout();
});
});
}

/**
Expand Down Expand Up @@ -379,7 +386,7 @@ export class MgtFlyout extends MgtBaseTaskComponent {
}
} else {
if (anchorRect.top + anchorRect.height + flyoutRect.height + this._edgePadding > windowRect.height) {
// it will render offscreen bellow, move it up a bit
// it will render offscreen below, move it up a bit
top = windowRect.height - flyoutRect.height - this._edgePadding;
} else {
top = Math.max(anchorRect.top + anchorRect.height, this._edgePadding);
Expand Down

0 comments on commit f799f3a

Please sign in to comment.