Skip to content

Commit f7266b1

Browse files
committed
closes #2952
1 parent df822da commit f7266b1

File tree

1 file changed

+1
-1
lines changed
  • 2-ui/3-event-details/4-mouse-drag-and-drop

1 file changed

+1
-1
lines changed

2-ui/3-event-details/4-mouse-drag-and-drop/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ That's why the initial idea to put handlers on potential droppables doesn't work
219219
220220
So, what to do?
221221
222-
There's a method called `document.elementFromPoint(clientX, clientY)`. It returns the most nested element on given window-relative coordinates (or `null` if given coordinates are out of the window).
222+
There's a method called `document.elementFromPoint(clientX, clientY)`. It returns the most nested element on given window-relative coordinates (or `null` if given coordinates are out of the window). If there are multiple overlapping elements on the same coordinates, then the topmost one is returned.
223223

224224
We can use it in any of our mouse event handlers to detect the potential droppable under the pointer, like this:
225225

0 commit comments

Comments
 (0)