Skip to content

Commit

Permalink
[JENKINS-67496] Drag & drop is messed up, drag placeholders always ha…
Browse files Browse the repository at this point in the history
…ve tiny size (jenkinsci#6184)
  • Loading branch information
benebsiny authored Jan 28, 2022
1 parent adf23ab commit 726c68c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions war/src/main/js/sortable-drag-drop.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ function registerSortableDragDrop(e) {
forceFallback: true, // Do not use html5 drag & drop behaviour because it does not work with autoscroll
scroll: true,
bubbleScroll: true,
onChoose: function (event) {
const draggableDiv = event.item;
const height = draggableDiv.clientHeight;
draggableDiv.style.height = `${height}px`;
},
onUnchoose: function (event) {
event.item.style.removeProperty('height');
}
});
}

Expand Down

0 comments on commit 726c68c

Please sign in to comment.