Skip to content

Commit 2e9256c

Browse files
committed
MC-3484: z-index issues with MC-1416
- Moved selectors to config
1 parent 7c4c6de commit 2e9256c

File tree

3 files changed

+12
-4
lines changed
  • app/code/Magento/PageBuilder/view

3 files changed

+12
-4
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type/text/preview.js

Lines changed: 2 additions & 2 deletions
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/content-type/text/preview.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,18 @@ export default class Preview extends BasePreview {
5050
* Fixes z-index issues for tabs and column
5151
*/
5252
private onFocus() {
53-
$(this.element).closest(".tabs-content, .pagebuilder-column").css("z-index", 100);
53+
$(this.element).closest(
54+
this.config.additional_data.wysiwygConfig.parentSelectorsToUnderlay.join(",")
55+
).css("z-index", 100);
5456
}
5557

5658
/**
5759
* Event handler for wysiwyg blur
5860
* Fixes z-index issues for tabs and column
5961
*/
6062
private onBlur() {
61-
$(this.element).closest(".tabs-content, .pagebuilder-column").css("z-index", "");
63+
$(this.element).closest(
64+
this.config.additional_data.wysiwygConfig.parentSelectorsToUnderlay.join(",")
65+
).css("z-index", "");
6266
}
6367
}

app/code/Magento/PageBuilder/view/base/pagebuilder/content_type/text.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@
4949
<additional_data>
5050
<item name="wysiwygConfig" xsi:type="array">
5151
<item name="wysiwygConfigData" xsi:type="object">Magento\PageBuilder\Model\Config\ContentType\AdditionalData\Provider\Wysiwyg\Config</item>
52+
<item name="parentSelectorsToUnderlay" xsi:type="array">
53+
<item name="0" xsi:type="string">.tabs-content</item>
54+
<item name="1" xsi:type="string">.pagebuilder-column</item>
55+
</item>
5256
</item>
5357
</additional_data>
5458
</type>

0 commit comments

Comments
 (0)