Commit 23120a21 authored by Jean-Luc Martin's avatar Jean-Luc Martin

Fixed IE10 issue with getBoundingClientRect

parent e3c291fc
......@@ -44,7 +44,15 @@ c3_chart_internal_fn.getCurrentPaddingRight = function () {
c3_chart_internal_fn.getParentRectValue = function (key) {
var parent = this.selectChart.node(), v;
while (parent && parent.tagName !== 'BODY') {
v = parent.getBoundingClientRect()[key];
try {
v = parent.getBoundingClientRect()[key];
} catch(e) {
if (key === 'width') {
// In IE in certain cases getBoundingClientRect
// will cause an "unspecified error"
v = parent.offsetWidth;
}
}
if (v) {
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment