Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8296625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:05:40+00:00 2026-06-08T15:05:40+00:00

BACKGROUND: I have a draggable that I drop inside a droppable cum draggable. On

  • 0

BACKGROUND:
I have a draggable that I drop inside a droppable cum draggable. On ‘Drop’, the draggable becomes nested inside droppable. On ‘out’ (i.e. dragging the draggable outside the droppable) the draggable becomes un-nested – i.e. becomes nested to the body.

ISSUE:
The nesting and un-nesting of a draggable causes the position of the draggable snapping to a new position. This is because the css of the draggable contains the relative position to the previsous parent, and in the process of nesting to a new parent, this relative css is assumed to be with respect to the new parent.

EXAMPLE AND PROBLEM:
Example at http://jsfiddle.net/sandeepy02/CNtRX/2/
You can replicate the issue by

  1. create objects ‘Room’ and ‘Table’.

  2. Move ‘Room’.

  3. Drop ‘Table’ into ‘Room’.

The table is repositioned away from the mouse cursor. The reason this is happening is because the css for ‘table’ contains the position of table relative to main boundaryContainer. When i drop and nest ‘table’ into ‘room’, the same relative position is then applied relative to ‘room’, thus causing the sudden change in position of ‘table’.

Infact when I drag out the ‘table’ then the position again snaps to a different psoition because the ‘table’ css now contains relative position to ‘room’ and appending ‘table’ back to ‘boundaryContainer’ causes the relative position to ‘room’ being assumed as relative position to ‘boundaryContainer’.

Any help will be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T15:05:46+00:00Added an answer on June 8, 2026 at 3:05 pm

    You problem lies in two extra paramters which are appended to the Table Div -> left & top . A workaround which I suggest is, there is an option to call a function after each draggable or droppable event. In that function you can set value of these two attributes to 0;

    When I removed those using Firebug, the position was aligned perfectly. Can you try it and post the result here?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some very long draggable elements that I can drop in all cells
i have done drag and drop using with jquery. here i have issue that
I have this jquery issue that seems to only break when using background image
I have a window with the following: Background={x:Null} AllowsTransparency=True WindowStyle=None Dragging the window by
I have a specific drawable that I use as background in my app. It
I have a draggable that is connected via connectToSortable to multiple sortables. I want
I have some jquery code that i want to able to drag, drop, clone
I have a draggable div element that uses HTML 5 localStorage to remember its
When I drag a link that is inside a draggable div over an iframe
I have ImageButtons that take a background, this background provides a standard shape for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.