yassine yassine - 1 year ago 188
CSS Question

Drag disable on position fixed

i'm trying to drag a div from another div which have a position fixed, but it is not working ! the drag is disabled. But when i change the position to another type (absolute, relative ..etc) the drag works fine .


.artefact {
width: 100px;
height : 100px;
background-color: grey;
position: relative;

#zoneEchange7 {
width: 20%;
height: 9.2592%;
/* position: fixed;*/
bottom: 0;
left: 70%;
/*background-color: #6adcfa;*/


<div id="zoneEchange7" class="zoneEchange">
<div id="Artefact4" class="draggable artefact"> <p> Titre </p> </div>


inertia: true,
//l element reste dans sa zone limite , il peut pas sortir de son parent
restrict: {
// restriction: "parent",
endOnly: true,
elementRect: { top: 0, left: 0, bottom: 1, right: 1 }
// activer autoScroll
autoScroll: true,

//appeler cette fonction a chaque action de glissement
onmove: dragMoveListener,
//appeler cette fontion a chaque fin de l'action de glissement
onend: function (event) {


Answer Source

To enforced draggable() object to fixed position. Try to add a high z-index to the fixed element.

position: fixed;
z-index: 1000;


position: fixed !important;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download