Skip to content

Commit 2b43c5d

Browse files
authored
Update README.md
Is this better?
1 parent af306c9 commit 2b43c5d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,6 @@ That's it! React Sortable does not come with any styles by default, since it's m
8686

8787
More code examples are available [here](https://github.com/clauderic/react-sortable-hoc/blob/master/examples/).
8888

89-
### CSS messing up on drag?
90-
91-
When a DOM element is being dragged, a _drag-helper_ node is added to the end of the `<body>`, which is the actual DOM node you see being dragged on the screen. The original DOM node will still be in-place to preserve its position in the DOM until the end of the drag (with inline-styling to make it invisible). If the _drag-helper_ gets messed up from a CSS standpoint, consider that maybe your selectors to the draggable item are dependent on a parent element which isn't present anymore (again, since the _drag-helper_ is at the end of the `<body>`).
92-
9389
### Prop Types
9490

9591
#### SortableContainer HOC
@@ -138,6 +134,13 @@ Asking for help
138134
----------------
139135
Please do not use the issue tracker for personal support requests. Instead, use [Gitter](https://gitter.im/clauderic/react-sortable-hoc) or StackOverflow.
140136

137+
Common Pitfalls
138+
---------------
139+
140+
### CSS messing up on drag?
141+
142+
Upon sorting, `react-sortable-hoc` creates a clone of the element you are sorting (the _sortable-helper_) and appends it to the end of the `<body>` tag. The original element will still be in-place to preserve its position in the DOM until the end of the drag (with inline-styling to make it invisible). If the _sortable-helper_ gets messed up from a CSS standpoint, consider that maybe your selectors to the draggable item are dependent on a parent element which isn't present anymore (again, since the _sortable-helper_ is at the end of the `<body>`).
143+
141144
Contributions
142145
------------
143146
Yes please! Feature requests / pull requests are welcome.

0 commit comments

Comments
 (0)