Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draggable revert and ghosting error #25

Open
tonycoco opened this issue Jan 21, 2011 · 2 comments
Open

Draggable revert and ghosting error #25

tonycoco opened this issue Jan 21, 2011 · 2 comments

Comments

@tonycoco
Copy link

Whilst creating a Draggable element and initializing it with both ghosting set to true and revert set to true the parentNode of the clone is never found and thus errors out.

@tonycoco
Copy link
Author

A simple test like, "new Draggable('demo_element', { revert: true, ghosting: true });" will blow up in your face.

@jwestbrook
Copy link

Sorry for a long response time - but you can fix the element after the revert by passing an anonymous function to revert and then reseting position and zIndex and returning false like below

new Draggable(div, { 
    "revert" : function(e){
        e.style.position = "relative";
        e.style.zIndex = '';
        return false;
    },
    "ghosting" : true
  });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants