Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
MM-155703 certain aspect ratio of images cause pop on firefox
Browse files Browse the repository at this point in the history
* Svg's need max dimention styles with px suffix
  • Loading branch information
sudheerDev committed May 20, 2019
1 parent bf44261 commit 8fa16ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/__snapshots__/size_aware_image.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ exports[`components/SizeAwareImage should render a placeholder and has loader wh
<svg
style={
Object {
"maxHeight": "200",
"maxWidth": "300",
"maxHeight": "200px",
"maxWidth": "300px",
"verticalAlign": "middle",
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/size_aware_image.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export default class SizeAwareImage extends React.PureComponent {
<svg
xmlns='http://www.w3.org/2000/svg'
viewBox={`0 0 ${dimensions.width} ${dimensions.height}`}
style={{verticalAlign: 'middle', maxHeight: `${dimensions.height}`, maxWidth: `${dimensions.width}`}}
style={{verticalAlign: 'middle', maxHeight: `${dimensions.height}px`, maxWidth: `${dimensions.width}px`}}
/>
</div>
);
Expand Down

0 comments on commit 8fa16ac

Please sign in to comment.