editor: fix sortable tab/widget list scroll jumps

This commit is contained in:
jean-emmanuel 2017-07-04 09:18:00 +02:00
parent a91afaef7f
commit b32aaabe08
2 changed files with 11 additions and 3 deletions

View file

@ -153,8 +153,8 @@ var editObject = function(container, data, refresh){
}
list.sortable({
forcePlaceholderSize: true,
items: '.sortables',
placeholder: "sortable-placeholder btn small",
start:function(){$(this).sortable( "refreshPositions" )},
update: function(e,ui){
var prevIndex = $(ui.item).attr('data-index')
@ -208,9 +208,9 @@ var editObject = function(container, data, refresh){
}
list.sortable({
start:function(){$(this).sortable( "refreshPositions" )},
forcePlaceholderSize: true,
items: '.sortables',
placeholder: "sortable-placeholder btn small",
start:function(){$(this).sortable( "refreshPositions" )},
update: function(e,ui){
var prevIndex = $(ui.item).attr('data-index')
var newIndex = $(ui.item).index()

View file

@ -73,9 +73,17 @@
flex-direction: column;
ul {
padding: 1rem 2rem!important;
overflow: auto;
li:not(:last-child) {
margin-bottom: 2rem!important;
}
.sortable-placeholder {
background: transparent;
&:after {
content:"|";
color: transparent;
}
}
}
}
.checkbox {