Skip to content

Commit b1fd7d6

Browse files
authored
Merge pull request #3491 from plotly/3489-v-modebar-ie11-pr
replace prepend() calls since they aren't supported in IE11
2 parents ea7941b + 4b164a2 commit b1fd7d6

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Diff for: src/components/modebar/modebar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ proto.update = function(graphInfo, buttons) {
8888
}
8989

9090
if(fullLayout.modebar.orientation === 'v') {
91-
this.element.prepend(logoGroup);
91+
this.element.insertBefore(logoGroup, this.element.childNodes[0]);
9292
} else {
9393
this.element.appendChild(logoGroup);
9494
}

Diff for: test/jasmine/assets/unpolyfill.js

+12
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,17 @@
1818
].join(' '));
1919
}
2020
});
21+
22+
Object.defineProperty(item, 'prepend', {
23+
configurable: true,
24+
enumerable: true,
25+
writable: true,
26+
value: function remove() {
27+
throw Error([
28+
'test/jasmine/assets/unpolyfill.js error: calling ChildNode.prepend()',
29+
'which is not available in IE.'
30+
].join(' '));
31+
}
32+
});
2133
});
2234
})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);

0 commit comments

Comments
 (0)