Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad interaction between FloatingIndicator and compound Modal components #6967

Closed
1 of 2 tasks
alexis-exaud opened this issue Oct 11, 2024 · 2 comments
Closed
1 of 2 tasks
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@alexis-exaud
Copy link

alexis-exaud commented Oct 11, 2024

Dependencies check up

  • I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

7.13.2

What package has an issue?

@mantine/core

What framework do you use?

Vite

In which browsers you can reproduce the issue?

All

Describe the bug

When a FloatingIndicator is placed inside a normal <Modal /> component, things work fine, but when it's placed inside compound Modal components (e.g. <Modal.Body />) the floating indicator doesn't fill the control component on first render. This happens regardless of the nesting level of FloatingIndicator.

After the active index is changed for the first time, it sorts itself out, but the first render is always bugged.

If possible, include a link to a codesandbox with a minimal reproduction

https://codesandbox.io/p/sandbox/mantine-modal-and-floatingindicator-issue-nd6qyt

Possible fix

No response

Self-service

  • I would be willing to implement a fix for this issue
rtivital added a commit that referenced this issue Oct 16, 2024
@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label Oct 16, 2024
@rtivital
Copy link
Member

The issue is with the transition used by Modal.Root component, by default that transition was set to pop which included scale transform. Scale transforms are incompatible with FloatingIndicator and SegmentedControl components (this issue cannot be resolved). If you are planning to use such components in your Modal.Root, you need to update transition to fade-down or other value that does not include scaling transform.

I've updated the default transition value for Modal.Root to fade-down to match the modal component, it will be available with the next 7.13.3 patch release.

@rtivital
Copy link
Member

Fixed in 7.13.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

2 participants