diff --git a/2-ui/3-event-details/4-mouse-drag-and-drop/article.md b/2-ui/3-event-details/4-mouse-drag-and-drop/article.md index a4a0ccb5..e8126f5b 100644 --- a/2-ui/3-event-details/4-mouse-drag-and-drop/article.md +++ b/2-ui/3-event-details/4-mouse-drag-and-drop/article.md @@ -29,6 +29,8 @@ ball.onmousedown = function(event) { // (1) start the process // (2) prepare to moving: make absolute and on top by z-index ball.style.position = 'absolute'; ball.style.zIndex = 1000; + // move it out of any current parents directly into body + // to make it positioned relative to the body document.body.append(ball); // ...and put that absolutely positioned ball under the cursor