I am facing an issue while working with JQuery UI-Draggable divs inside a container that has a fixed height and a scrollable y-axis. Whenever I drag the elements outside the container, the overflow-y: scroll
rule hides them.
You can view the code on jsFiddle with the overflow-y: scroll
setting.
Alternatively, you can view the code on another jsFiddle without the overflow
rule.
I came across Prodikl's solution, which involves a helper-clone that is appended to the document body. However, I am looking for a solution that does not rely on a helper-clone. I want the actual div to be visibly moving.
You can see the jsFiddle of Prodikl's solution to my problem to verify that it works.
Here are the methods I have tried:
- Setting the
z-index
of both draggable divs to99999
- Trying different values for the
overflow-x
property likevisible
,auto
,initial
, andinherit
- Setting the
containment
option to.master-container
and higher - Setting the
stack
option to.master-container
and higher - Setting the
zIndex
option to99999
- Combining all the above options simultaneously
Edit:
I had to remove 3 links as I lack the reputation to post more than 2 links.
If you need to access the jsFiddles, you can find them with the ending IDs a68ytmbw/4/
and a68ytmbw/3/
, rather than a68ytmbw/2/
. Please inform me if I am violating any rules by providing additional references to the jsFiddle.