Skip to content

Commit a9381a7

Browse files
committed
MC-5423: Scheduled Update slide out issues
1 parent ac1eae1 commit a9381a7

File tree

5 files changed

+25
-6
lines changed

5 files changed

+25
-6
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/css/source/_panel.less

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,3 +307,10 @@
307307
}
308308
}
309309
}
310+
311+
.modal-slide .modal-content .pagebuilder-panel-wrapper {
312+
position: -webkit-sticky;
313+
position: sticky;
314+
top: 10px;
315+
bottom: 0;
316+
}

app/code/Magento/PageBuilder/view/adminhtml/web/js/panel.js

Lines changed: 9 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/template/page-builder.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<div class="admin__field pagebuilder-header">
1010
<i click="toggleFullScreen.bind($data)" css="'icon-pagebuilder-fullscreen': !isFullScreen(), 'action-close': isFullScreen()"></i>
1111
</div>
12-
<br/>
1312
<with args="panel">
1413
<render/>
1514
</with>

app/code/Magento/PageBuilder/view/adminhtml/web/template/panel.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ <h4 translate="label"></h4>
3636
<div>
3737
<ul class="pagebuilder-panel-groups-content-types" each="contentTypes">
3838
<li class="pagebuilder-draggable-content-type"
39-
data-bind="draggable: Object.assign($parents[1].getDraggableOptions(), getDraggableOptions())"
39+
data-bind="draggable: Object.assign($parents[1].getDraggableOptions($element), getDraggableOptions($element))"
4040
attr="id: 'content-type-' + identifier()">
4141
<a>
4242
<span class="content-type-icon">

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/panel.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,19 @@ export default class Panel implements PanelInterface {
179179
*
180180
* @returns {JQueryUI.DraggableOptions}
181181
*/
182-
public getDraggableOptions(): JQueryUI.DraggableOptions {
182+
public getDraggableOptions(element: HTMLElement): JQueryUI.DraggableOptions {
183+
let containment: string | JQuery = "document";
184+
if ($(element).parents(".modal-inner-wrap").length > 0) {
185+
containment = $(element).parents(".modal-inner-wrap");
186+
}
187+
183188
const self = this;
184189
return {
185190
appendTo: "body",
186191
cursor: "-webkit-grabbing",
187192
connectToSortable: ".content-type-drop",
188-
containment: "document",
193+
containment,
194+
scroll: true,
189195
helper() {
190196
return $(this).clone().css({
191197
width: $(this).width(),

0 commit comments

Comments
 (0)