Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix/14954-export-styledMode-ie #14957

Merged
merged 2 commits into from Feb 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions js/Extensions/Exporting.js
Expand Up @@ -1876,9 +1876,9 @@ Chart.prototype.inlineStyles = function () {
* @return {void}
*/
function tearDown() {
dummySVG.parentNode.remove();
dummySVG.parentNode.removeChild(dummySVG);
// Remove trash from DOM that stayed after each exporting
iframe.remove();
iframe.parentNode.removeChild(iframe);
}
recurse(this.container.querySelector('svg'));
tearDown();
Expand Down
6 changes: 6 additions & 0 deletions samples/unit-tests/exporting/getsvg/demo.js
Expand Up @@ -111,6 +111,10 @@ QUnit.test('getSVG', function (assert) {
'Reference by id, series name ok'
);

// #14954
const remove = Element.prototype.remove;
Element.prototype.remove = void 0;

chart.getSVG({
chart: {
styledMode: true
Expand All @@ -131,6 +135,8 @@ QUnit.test('getSVG', function (assert) {
false,
'Iframe should be destroyed in DOM after getSVG().'
);

Element.prototype.remove = remove;
});

QUnit.test('Hide label with useHTML', function (assert) {
Expand Down
4 changes: 2 additions & 2 deletions ts/Extensions/Exporting.ts
Expand Up @@ -2565,9 +2565,9 @@ Chart.prototype.inlineStyles = function (): void {
* @return {void}
*/
function tearDown(): void {
(dummySVG.parentNode as any).remove();
dummySVG.parentNode.removeChild(dummySVG);
// Remove trash from DOM that stayed after each exporting
iframe.remove();
iframe.parentNode.removeChild(iframe);
}

recurse(this.container.querySelector('svg') as any);
Expand Down