Skip to content

Commit

Permalink
fix(ripple): ClientRect => defaultrect object (#754)
Browse files Browse the repository at this point in the history
  • Loading branch information
gugu authored and Matt Goo committed Mar 18, 2019
1 parent 7594cae commit b2f78e8
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/ripple/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,18 @@ export function withRipple <
computeBoundingRect: () => {
if (!this.isComponentMounted) {
// need to return object since foundation expects it
return {};
// new DOMRect is not IE11 compatible
const defaultDOMRect = {
bottom: 0,
height: 0,
left: 0,
right: 0,
top: 0,
width: 0,
x: 0,
y: 0,
};
return defaultDOMRect;
}
if (this.props.computeBoundingRect) {
return this.props.computeBoundingRect(surface);
Expand Down

0 comments on commit b2f78e8

Please sign in to comment.