clauderic / clauderic/react-sortable-hoc

nested positioned containing element sortable issue. Because of getEdgeOffset function

Open
#519 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
10.9k
Forks
959
PR merge metrics
No merged PRs in 30d

Description

The implementation of getEdgeOffset with a bug.
https://github.com/clauderic/react-sortable-hoc/blob/dd3151f68833ce32d26c0ac9a756b509e8439b68/src/utils.js#L159

As I understand, this function calculate the offset distance of scrollable container.
But the lib use node.parentNode instead of [node.offsetParent](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent)

Here is a [example](https://codesandbox.io/embed/33xo48npq) drag item2 .

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.