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

[Popover] Height and width animations are not working as expected due to top and left properties #21561

Open
Ashishdce opened this issue Jun 24, 2020 · 5 comments
Labels
bug 🐛 Something doesn't work component: Popover The React component.

Comments

@Ashishdce
Copy link

Ashishdce commented Jun 24, 2020

Popover always positions itself using top and left properties. But if we change the height or width of the content, popover always grow vertically downwards in case of height or towards the right in case of width.

  • [ *] The issue is present in the latest release.
  • [ *] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

Expected Behavior 🤔

We should be able to control the properties using which popover should position itself. Depending on the usecase, user should be able to choose a combination of top/bottom and right/left.

Steps to Reproduce 🕹

You can see the issue here.
https://codesandbox.io/s/twilight-architecture-dqn2n?file=/src/App.js

Steps:

  1. Click on the Open Popover button
  2. Click on expand

The popover grows downwards covering the anchor element. And repositions itself when the Shrink button is clicked.

We can use a prop to supply what properties the popover should use. I would be happy to raise a PR for this.

Context 🔦

Your Environment 🌎

Tech Version
Material-UI v4.10.2
React
Browser
TypeScript
etc.
@Ashishdce Ashishdce added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jun 24, 2020
@oliviertassinari oliviertassinari added component: Popover The React component. bug 🐛 Something doesn't work and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jun 25, 2020
@oliviertassinari
Copy link
Member

We plan to replace the positioning logic of the Popover component with the Popper one. It should address this problem at the same time.

@oliviertassinari oliviertassinari added this to the v5 milestone Jun 25, 2020
@Ashishdce
Copy link
Author

Great. Thanks.

@ahmetuysal
Copy link

Any updates on this issue?

@oliviertassinari oliviertassinari modified the milestones: v5-beta, v5.1 May 10, 2021
@oliviertassinari oliviertassinari removed this from the v5.1 milestone Nov 10, 2021
@AlexeyUryvaev
Copy link

AlexeyUryvaev commented Feb 20, 2022

@oliviertassinari

We plan to replace the positioning logic of the Popover component with the Popper one. It should address this problem at the same time.

Hi! Any chance of fixing this in the near future?

@seemX17
Copy link

seemX17 commented Jul 17, 2024

@oliviertassinari
Are we planning to fix this issue anytime soon? Is there a workaround for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: Popover The React component.
Projects
None yet
Development

No branches or pull requests

5 participants