Skip to content
Snippets Groups Projects
Commit 16f55ec6 authored by Francesco Pesenti's avatar Francesco Pesenti
Browse files

Fix the Layout Builder built-in block move

parent eb6b8a25
No related branches found
No related tags found
1 merge request!15Fix the Layout Builder built-in block move
......@@ -135,6 +135,12 @@
display: block;
}
.layout-builder__region {
outline-offset: -1px;
padding: 1px;
overflow: hidden;
}
.layout-builder__region.droppable {
outline: 3px solid #4D7C0F;
}
......
......@@ -83,6 +83,10 @@ NodeList.prototype.forEach = HTMLCollection.prototype.forEach = Array.prototype.
document.addEventListener('drop', (event) => {
event.preventDefault();
if (!dragged.classList.contains('lb-plus__draggable')) {
return;
}
const lbregion = event.target.classList.contains('layout-builder__region') ? event.target : event.target.closest('.layout-builder__region');
if (lbregion && dragged) {
lbregion.classList.remove('lb_plus__not-allowed');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment