microsoft / fluentui

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.
https://react.fluentui.dev
Other
17.75k stars 2.65k forks source link

[Bug]: Tooltip scrolling issues with long text #31274

Closed msDestiny14 closed 1 week ago

msDestiny14 commented 1 week ago

Library

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

System Info

Edge

Are you reporting Accessibility issue?

None

Reproduction

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

Bug Description

It would appear that when creating a tooltip with long text and setting the position to "after" there is an issue when scrolling the page. (This happens if the tooltip is so long it extends past the bottom of the viewport)

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

Actual Behavior

Tooltip is stuck and properly scroll with page.

Expected Behavior

Tooltip should scroll properly with the page.

https://github.com/microsoft/fluentui/assets/67929198/01ad1181-86cf-4040-b4d7-eec4918aace7

Logs

No response

Requested priority

Blocking

Products/sites affected

No response

Are you willing to submit a PR to fix?

no

Validations

layershifter commented 1 week ago

@msDestiny14 please use autoSize: 'height' or other autoSize values depending on the scenario in such cases, I updated your example: https://stackblitz.com/edit/mper2n-6wjl91?file=src%2Fexample.tsx,src%2Findex.tsx

You can find out more in docs about positioning https://react.fluentui.dev/?path=/docs/concepts-developer-positioning-components--default#auto-size-for-small-viewport.