bug: "bounds" doesn't work as expected

Open
#604 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, react
Domain
frontend

Research direction

Start with the linked CodeSandbox reproduction and inspect src/styles.css, focusing on the position:relative element between the Draggable and the .wrapper bounds element. Reproduce the reported bounds and verify that leftward dragging works when the intermediate element is positioned relative.

Written by the indexing model from the issue text.

Description

When a dom with "position:relative" between [Dragable bounds=".wrapper"] and [div className="wrapper" ], the Dragable's bounds will be {{left:0, right:Horizontal scroll,top: 0, bottom: vertical scroll}}, that means I can't drag it to the left.
In actual situations, I need to set the “position” to ”relative“ in middle dom

https://codesandbox.io/s/strange-sound-9ehor?file=/src/styles.css

Dominant language
JavaScript
Stars
9.3k
Forks
1k
Avg merge
3d 8h
Merged PRs (30d)
4

Contributor guide

No contributing guide indexed for this repository

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.

More from react-grid-layout/react-draggable

All issues in react-grid-layout/react-draggable

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.