Skip to content
Snippets Groups Projects

Resolve #3420203 "Bottom section drop zone bad"

6 files
+ 14
15
Compare changes
  • Side-by-side
  • Inline
Files
6
+ 2
2
@@ -76,7 +76,7 @@ document.addEventListener('element-dropped', e => {
if (type === 'section') {
// Pass either the section ID to put this block in front of, or the string
// "last" to put it at the end.
destination.section = dropZone.nextElementSibling?.classList.contains('lb-plus-section') ? dropZone.nextElementSibling.id : 'last';
destination.section = dropZone.getAttribute('preceding-section-id');
}
// Check if the block is coming from a different section storage.
const nestedStoragePathFrom = draggedBlock.closest('[data-nested-storage-path]')?.dataset.nestedStoragePath;
@@ -143,7 +143,7 @@ document.addEventListener('element-dropped', e => {
if (type === 'section') {
// Pass either the section ID to put this block in front of, or the string
// "last" to put it at the end.
destination.section = dropZone.nextElementSibling?.classList.contains('lb-plus-section') ? dropZone.nextElementSibling.id : 'last';
destination.section = dropZone.getAttribute('preceding-section-id');
}
// Place the block.
Loading