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

Commit

Permalink
MM-15709 certain aspect ratio of images cause pop on firefox (#2826)
Browse files Browse the repository at this point in the history
* MM-155703 certain aspect ratio of images cause pop on firefox

* Svg's need max dimention styles with px suffix

* remove string convertion and keep maxHeight and maxWidth as numbers
  • Loading branch information
sudheerDev authored May 22, 2019
1 parent 6523f32 commit 0dab1a5
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": 200,
"maxWidth": 300,
"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, maxWidth: dimensions.width}}
/>
</div>
);
Expand Down

0 comments on commit 0dab1a5

Please sign in to comment.