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

Updating popover content does not keep correct anchor position #17586

Closed
2 tasks done
Finomnis opened this issue Sep 26, 2019 · 3 comments
Closed
2 tasks done

Updating popover content does not keep correct anchor position #17586

Finomnis opened this issue Sep 26, 2019 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@Finomnis
Copy link

  • 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 😯

When Popover component gets created with anchorOrigin: ["bottom", "right"] and transformOrigin: ["top", "right"], the Popover is positioned with its top-right corner touching the bottom-right corner of the anchor button, as expected.

When the size of the Popover changes while displayed, it gets resized anchored at its top left corner, independent of where its anchor point got set in transformOrigin.

Expected Behavior 🤔

After resizing, the Popover should still be positioned as specified in anchorOrigin and transformOrigin.

Steps to Reproduce 🕹

Open this CodeSandbox:
https://codesandbox.io/s/material-demo-qkzij

Click the button and you will see a Popover that changes its size dynamically while displayed.
While specified to be anchored on the right side of the button, it will move its anchor point during resizing.

Context 🔦

I have a status icon, and I use Popover to display additional information when the icon is clicked. The information is dynamic and changes every second. The icon is on the right side of the screen, and I would prefer the accompanying Popover to stay aligned at the right side as well, even with the changing size.

Your Environment 🌎

Tech Version
Material-UI v4.4.3
React v16.9.0
Browser Google Chrome v76.0.3809.132
@oliviertassinari oliviertassinari added the duplicate This issue or pull request already exists label Sep 26, 2019
@oliviertassinari
Copy link
Member

oliviertassinari commented Sep 26, 2019

Duplicate of #10595

@oliviertassinari oliviertassinari marked this as a duplicate of #17586 Sep 26, 2019
@Finomnis

This comment has been minimized.

@oliviertassinari oliviertassinari marked this as a duplicate of #10595 Sep 26, 2019
@oliviertassinari
Copy link
Member

oliviertassinari commented Sep 26, 2019

Updated, thanks for raising

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants