diff --git a/modules/backend/assets/js/october.scrollbar.js b/modules/backend/assets/js/october.scrollbar.js index e6ea7cfa4..8b620bb13 100644 --- a/modules/backend/assets/js/october.scrollbar.js +++ b/modules/backend/assets/js/october.scrollbar.js @@ -82,7 +82,7 @@ event.stopPropagation() }) - $(window).on('resize', $.proxy(this.update, this)) + $(window).on('resize, oc.updateUi', $.proxy(this.update, this)) /* * Internal event, drag has started diff --git a/modules/backend/assets/js/october.sortable.js b/modules/backend/assets/js/october.sortable.js index 0490706d4..2d04de21d 100644 --- a/modules/backend/assets/js/october.sortable.js +++ b/modules/backend/assets/js/october.sortable.js @@ -53,9 +53,14 @@ var offset = $item.offset(), pointer = container.rootGroup.pointer - cursorAdjustment = { - left: pointer.left - offset.left, - top: pointer.top - offset.top + if (pointer) { + cursorAdjustment = { + left: pointer.left - offset.left, + top: pointer.top - offset.top + } + } + else { + cursorAdjustment = null } $item.css({ @@ -68,13 +73,17 @@ // Executed at the beginning of a mouse move event. // The Placeholder has not been moved yet. onDrag: function ($item, position, _super, event) { - // Relative cursors position - $item.css({ - left: position.left - cursorAdjustment.left, - top: position.top - cursorAdjustment.top - }) - // Default behavior - // $item.css(position) + if (cursorAdjustment) { + // Relative cursors position + $item.css({ + left: position.left - cursorAdjustment.left, + top: position.top - cursorAdjustment.top + }) + } + else { + // Default behavior + $item.css(position) + } }, // Called when the mouse button is beeing released onDrop: function ($item, container, _super, event) {