We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
PopoverAnimationVertical does not open vertically when the targetOrigin.horizontal is middle.
targetOrigin.horizontal
middle
This is caused by this line of code: https://github.com/callemall/material-ui/blob/master/src/Popover/PopoverAnimationVertical.js#L11
const horizontal = targetOrigin.horizontal.replace('middle', 'vertical');
which is then used in the style below:
transformOrigin: `${horizontal} ${targetOrigin.vertical}`,
However, vertical is not a valid transform-origin property: https://developer.mozilla.org/en-US/docs/Web/CSS/transform-origin
vertical
The end result is that the animation doesn't have a transform-origin defined at all and produces an odd animation -- a sort of grow from inside out.
Suggested fix is: const horizontal = targetOrigin.horizontal.replace('middle', 'center');
const horizontal = targetOrigin.horizontal.replace('middle', 'center');
Which fixes my use case, but I imagine you would need to test for all the different possible directions and adjust it accordingly.
https://www.webpackbin.com/bins/-Kp2LJe4qy7KTfHen7T4
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Problem description
PopoverAnimationVertical does not open vertically when the
targetOrigin.horizontal
ismiddle
.This is caused by this line of code:
https://github.com/callemall/material-ui/blob/master/src/Popover/PopoverAnimationVertical.js#L11
const horizontal = targetOrigin.horizontal.replace('middle', 'vertical');
which is then used in the style below:
However,
vertical
is not a valid transform-origin property:https://developer.mozilla.org/en-US/docs/Web/CSS/transform-origin
The end result is that the animation doesn't have a transform-origin defined at all and produces an odd animation -- a sort of grow from inside out.
Suggested fix is:
const horizontal = targetOrigin.horizontal.replace('middle', 'center');
Which fixes my use case, but I imagine you would need to test for all the different possible directions and adjust it accordingly.
Link to minimal working code that reproduces the issue
https://www.webpackbin.com/bins/-Kp2LJe4qy7KTfHen7T4
Versions
The text was updated successfully, but these errors were encountered: