Skip to content

[Bug]: InfoLabel does not respect mountNode property #31242

Closed
@brhallin

Description

@brhallin

Library

React Components / v9 (@fluentui/react-components)

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 Intel(R) Xeon(R) W-2235 CPU @ 3.80GHz
    Memory: 36.24 GB / 63.59 GB
  Browsers:
    Edge: Chromium (123.0.2420.97)
    Internet Explorer: 11.0.22621.1

Are you reporting Accessibility issue?

None

Reproduction

https://stackblitz.com/edit/4bnprj?file=src%2Fexample.tsx

Bug Description

Actual Behavior

When clicked, the InfoLabel popover component should be attached to the DOM as a child of the element passed to the control, e.g.

<InfoLabel
  {...props}
  infoButton={{ popover: { mountNode: popoverRoot } }}
/>

Expected Behavior

When clicked, the InfoLabel popover component is attached to the DOM as a sibling of its <button>.

Note that this behaviour was previously supported, albeit in a slightly different fashion, back when the component was simply known as InfoButton, via its popover property, e.g. <InfoButton {...rest} popover={{ mountNode: popoverRoot }} />.

In the provided minimal repro, we can see that the mountNode property provided does indeed point to a valid DOM element.

Logs

No response

Requested priority

Blocking

Products/sites affected

PowerApps Canvas InfoButton component

Are you willing to submit a PR to fix?

yes

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions