diff --git a/demos/sticky-postion.html b/demos/sticky-postion.html
index 37bad54c6..28248dafb 100644
--- a/demos/sticky-postion.html
+++ b/demos/sticky-postion.html
@@ -17,19 +17,18 @@
- - 0
- - 1
- - 2
- - 3
- - 4
- - 5
- - 6
- - 7
- - 8
- - 9
- - 10
- - 11
-
+
+ - 0
+ - 1
+ - 2
+ - 3
+ - 4
+ - 5
+ - 6
+ - 7
+ - 8
+ - 9
+
diff --git a/src/jquery.gridster.js b/src/jquery.gridster.js
index c85a965d9..cd54e471a 100755
--- a/src/jquery.gridster.js
+++ b/src/jquery.gridster.js
@@ -1203,7 +1203,7 @@
isDOM || ($el = wgd.el);
var empty_upper_row = this.can_go_widget_up(wgd);
- if (empty_upper_row) {
+ if (this.shift_widgets_up && empty_upper_row) {
wgd.row = empty_upper_row;
$el.attr('data-row', empty_upper_row);
this.$el.trigger('gridster:positionchanged', [wgd]);
@@ -1572,16 +1572,15 @@
var col = this.placeholder_grid_data.col;
var row = this.placeholder_grid_data.row;
- var widgetsIncell = this.get_widgets_at_cell(col,row);
+ this.set_cells_player_occupies(col, row);
+ this.$player.coords().grid.row = row;
+ this.$player.coords().grid.col = col;
+
+ var widgetsIncell = this.get_widgets_under_player();
if (widgetsIncell.length > 0) {
this.move_widget_down(widgetsIncell, this.placeholder_grid_data.size_y);
}
- this.set_cells_player_occupies(col, row);
-
- this.$player.coords().grid.row = row;
- this.$player.coords().grid.col = col;
-
if (this.options.draggable.stop) {
this.options.draggable.stop.call(this, event, ui);
}