Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: jQuery - draggable position issue after window scroll


I load a dynamically with a schedule grid consisting of droppable (the empty timeslots) and draggables (the planned items). My problem is that when after I scroll down the page, selecting a Draggable will not appear at the cursor (or the position it initially was) but moves its position upwards by the same amount I have scrolled down. (see image: mouse cursor is at 15:00, screen shows where the draggable moves to)

I know there was once a bug causing similar behaviour. However I use recent versions of Jquery (2.2.4) and jQuery UI (1.12.1). Also I came across this thread:

jQuery draggable shows helper in wrong place after page scrolled

And I have tried all the hacks to get it positioned right. But to no avail. Even when my console show the right top/left coordinates of the draggable. On my screen it still is in the wrong position.

Also very odd, is that this behaviour does not occur in Mac Chrome v58, but started to show up in v62. (maybe sooner as I have not tested each version in between). Same goes for Firefox previous versions on Mac. Also in Safari 9.1.2 (11601.7.7) it works just fine.

The page is in bootstrap format. The schedule content is loaded inside a div.

Droppable are appended to the scheduleWeek id's:

Draggables are appended to the droppables and are activated just with standard jQuery:

$( ".ui-draggable" ).draggable({
snap: ".droppable",
snapMode: "inner",
opacity: .4,

width: 100%;
height: 30px;
padding: 0;
margin: 0;
border: 1px solid;
.droppable {
width: 100%;
height: 30px;
padding: 0px;
float: left;
margin: 0px;
border-top: 1px dashed;
border-left: 1px dashed;
border-top: 1px dashed;

Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered

This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: jQuery - draggable position issue after window scroll


Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription