Skip to content

Commit 610851f

Browse files
PB-265: Video background for Banner
- fix static test failures
1 parent 3ba7fe8 commit 610851f

File tree

5 files changed

+29
-22
lines changed

5 files changed

+29
-22
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/banner/_default.less

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,15 @@
125125
}
126126

127127
&.jarallax {
128-
z-index: auto!important;
128+
z-index: auto !important;
129129
}
130130

131131
[id*='jarallax-container'] {
132-
z-index: 0!important;
132+
z-index: 0 !important;
133133

134134
> iframe,
135135
> video {
136-
z-index: 0!important;
136+
z-index: 0 !important;
137137
}
138138
}
139139
}

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

Lines changed: 8 additions & 6 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/js/content-type/slide/preview.js

Lines changed: 9 additions & 6 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/banner/preview.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import WysiwygFactory from "../../wysiwyg/factory";
2929
import WysiwygInterface from "../../wysiwyg/wysiwyg-interface";
3030
import {ContentTypeReadyEventParamsInterface} from "../content-type-events.types";
3131
import BasePreview from "../preview";
32+
import {Editor} from "tinymce";
3233

3334
/**
3435
* @api
@@ -132,15 +133,15 @@ export default class Preview extends BasePreview {
132133
},
133134
);
134135
// @ts-ignore
135-
this.wrapper.jarallax &&
136-
this.wrapper.jarallax.video &&
136+
if (this.wrapper.jarallax && this.wrapper.jarallax.video) {
137137
this.wrapper.jarallax.video.on("started", () => {
138138
// @ts-ignore
139139
if (this.wrapper.jarallax && this.wrapper.jarallax.$video) {
140140
// @ts-ignore
141141
this.wrapper.jarallax.$video.style.visibility = "visible";
142142
}
143-
});
143+
});
144+
}
144145
});
145146
}
146147

@@ -251,7 +252,7 @@ export default class Preview extends BasePreview {
251252

252253
if (focus) {
253254
wysiwygConfig.adapter.settings.auto_focus = this.element.id;
254-
wysiwygConfig.adapter.settings.init_instance_callback = (editor) => {
255+
wysiwygConfig.adapter.settings.init_instance_callback = (editor: Editor) => {
255256
editor.on("focus", () => {
256257
$(this.element).parents(this.bannerOverlaySelector).zIndex(this.activeEditorOverlayZIndex);
257258
});

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,17 @@ export default class Preview extends BasePreview {
137137
videoLazyLoading: (this.contentType.dataStore.get("video_lazy_load") as string) === "true",
138138
},
139139
);
140-
// @ts-ignore
141-
this.wrapper.jarallax &&
142-
this.wrapper.jarallax.video &&
140+
141+
if (this.wrapper.jarallax && this.wrapper.jarallax.video) {
142+
// @ts-ignore
143143
this.wrapper.jarallax.video.on("started", () => {
144144
// @ts-ignore
145145
if (this.wrapper.jarallax && this.wrapper.jarallax.$video) {
146146
// @ts-ignore
147147
this.wrapper.jarallax.$video.style.visibility = "visible";
148148
}
149149
});
150+
}
150151
});
151152
}
152153

0 commit comments

Comments
 (0)