Skip to content

Commit 58c1a17

Browse files
committed
MC-18601: Page Builder Render
- IE11 issues
1 parent 4fb6917 commit 58c1a17

File tree

4 files changed

+6
-35
lines changed

4 files changed

+6
-35
lines changed

app/code/Magento/PageBuilder/Controller/Adminhtml/Stage/Render.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ public function execute()
3838
'stage_render'
3939
);
4040
$renderBlock->setTemplate('Magento_PageBuilder::stage/render.phtml');
41-
$this->getResponse()->setBody($requireJs->toHtml() . $renderBlock->toHtml());
41+
$babelPolyfill = $layout->createBlock(
42+
\Magento\PageBuilder\Block\Adminhtml\Html\Head\BabelPolyfill::class,
43+
'pagebuilder.babel.polyfill'
44+
);
45+
$babelPolyfill->setTemplate('Magento_PageBuilder::html/head/babel_polyfill.phtml');
46+
$this->getResponse()->setBody($requireJs->toHtml() . $babelPolyfill->toHtml() . $renderBlock->toHtml());
4247
$this->getResponse()->sendResponse();
4348
}
4449
}

app/code/Magento/PageBuilder/view/adminhtml/templates/stage/render.phtml

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,6 @@
66

77
/** @var \Magento\PageBuilder\Block\Adminhtml\Stage\Render $block */
88
?>
9-
<script>
10-
<?php
11-
/**
12-
* Shim localStorage within the iframe to ensure any calls from Magento API's do not fail due to same origin
13-
* policies.
14-
*/
15-
?>
16-
Object.defineProperty(
17-
window,
18-
'localStorage',
19-
{
20-
get: function () {
21-
return {
22-
_data: {},
23-
setItem: function (id, val) {
24-
return this._data[id] = String(val);
25-
},
26-
getItem: function (id) {
27-
return this._data.hasOwnProperty(id) ? this._data[id] : null;
28-
},
29-
removeItem: function (id) {
30-
return delete this._data[id];
31-
},
32-
33-
clear: function () {
34-
return this._data = {};
35-
}
36-
};
37-
}
38-
}
39-
);
40-
</script>
419
<script src="<?= $block->escapeUrl($block->getRequireJsUrl()); ?>"></script>
4210
<script src="<?= $block->escapeUrl($block->getRequireJsConfigUrl()); ?>"></script>
4311
<script>

app/code/Magento/PageBuilder/view/adminhtml/web/js/master-format/render/frame.js

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/master-format/render/frame.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ function render(message: {stageId: string, tree: TreeItem}) {
106106
ko.cleanNode(element);
107107
const filtered: JQuery = filterHtml($(element));
108108
const output = decodeAllDataUrlsInString(filtered.html());
109-
element.remove();
110109
resolve(output);
111110
});
112111
ko.applyBindingsToNode(

0 commit comments

Comments
 (0)