Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
Comment thread
PaulGMardling marked this conversation as resolved.
"type": "patch",
"comment": "fix: dismiss non-modal Popover on focus exit across same-origin frames, preserving logical Portal hover, initial trigger Portal focus, and destination focus",
"packageName": "@fluentui/react-headless-components-preview",
"email": "paulmardling@microsoft.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"type": "patch",
"comment": "fix: establish portal virtual ownership during layout for focus observers",
"packageName": "@fluentui/react-portal",
"email": "paulmardling@microsoft.com"
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,7 @@
]
},
"devDependencies": {
"@fluentui/react-portal": "*",
"@fluentui/scripts-cypress": "*",
"@oddbird/popover-polyfill": "^0.6.1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,28 @@ describe('InfoLabel - close on tab-out', () => {
return cy.get('button.info-button').focus().realPress('{enter}');
};

it('preserves destination focus and does not duplicate close notifications', () => {
mount(
<>
<InfoLabel
label="Label"
info={<button data-testid="inside">Inside</button>}
infoButton={{
className: 'info-button',
popover: { onOpenChange: cy.spy().as('change') },
}}
/>
<button data-testid="after">After</button>
</>,
);
openInfoButton().get(surfaceSelector).should('exist');
cy.get('@change').invoke('resetHistory');
cy.get('[data-testid=inside]').focus().realPress('Tab');
cy.get(surfaceSelector).should('not.exist');
cy.get('[data-testid=after]').should('have.focus');
cy.get('@change').should('have.callCount', 0);
});

it('no focusable elements', () => {
mount(
<>
Expand Down
Loading
Loading