fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

[Callout]: After the callout is rendered and the target element moves its location, the callout should move accordingly.

Open junchen1 opened this issue 3 years ago • 3 comments

Library

React / v8 (@fluentui/react)

System Info

N/A

Are you reporting Accessibility issue?

None

Reproduction

N/A

Bug Description

Actual Behavior

The callout stays at the same location.

Expected Behavior

The callout should move together with the target.

Logs

N/A

Requested priority

Normal

Products/sites affected

N/A

Are you willing to submit a PR to fix?

no

Validations

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

junchen1 avatar Jan 30 '23 22:01 junchen1

@junchen1 Sorry, but the problem is unclear to me. Can you please fill the issue template fully i.e. provide reproduction and better explainer? 🙏

layershifter avatar Jan 31 '23 09:01 layershifter

The callout was originally aligned with "Sort by size". But the pink bar with string "Your storage is 90% full. If you run out" is rendered after the callout is rendered and pushed the "Sort by size" down. Then the callout is aligned to the wrong location.

[cid:e8aa3154-5bcd-4482-9616-8477e9be921c]

Thanks,

Jun

junchen1 avatar Jan 31 '23 21:01 junchen1

Callouts are typically placed on a separate layer, and positioned absolutely. They are not built to travel with their target. In the case the page scrolling, or resizing, the Callout's onDismiss is fired. We would expect the same thing to happen if the target moved.

If you would like it to track with the DOM, you can use the doNotLayer prop to avoid layering and to place the callout within the DOM of where it is rendered. This will allow it to move with the page, but often has issues with clipping.

micahgodbolt avatar Feb 10 '23 15:02 micahgodbolt