jquery / jquery/jquery-ui

When container is zoomed, Drag does not sync with mouse cursor

Open
#2,237 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Behavior shared with 1.12 Comp: Draggable Needs info
Dominant language
JavaScript
Stars
11.3k
Forks
5.2k
PR merge metrics
No merged PRs in 30d

Description

see https://stackoverflow.com/questions/8605439/jquery-draggable-div-with-zoom/8605589#8605589 for specific issue and example along with a workaround

if a container has (eg) $('#container').animate({ 'zoom': currentZoom += .1}, 'fast'); applied to it, any draggable objects in the container will still move but not correctly sync'ed to the cursor position.

I suspect related, but containment also doesn't work (constrains to the original object size, not the zoomed object)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Stack Overflow reproduction and the zoomed-container/draggable scenario described in the issue. Reproduce both cursor desynchronization and containment behavior; done means dragged objects track the cursor and containment follows the zoomed bounds, with regression coverage located in the repository's existing test path.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jquery
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.