You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes the native function document.elementFromPoint(x, y); can return null under normal usage scenarios - e.g. if the element is dragged off-screen - as some browsers (Chrome for mobile is one I encountered issues with) will not return an element if the x, y coords are outside the current viewport.
However, the default elementFromPoint implementation included in the mobile-drag-drop library does not return null if the element returned by the native function is null, instead it returns undefined. This causes issues further down the line as there are null checks but not undefined checks.
Example:
Uncaught TypeError: Cannot read properties of undefined (reading 'getBoundingClientRect')
at createDragEventFromTouch (drag-utils.ts:113:38)
at dispatchDragEvent (drag-utils.ts:145:22)
at DragOperationController._dragAndDropProcessModelIteration (drag-operation-controller.ts:514:21)
at drag-operation-controller.ts:240:18
This function can be overwritten in the config so it's not a blocker but still might be worth looking at.
The text was updated successfully, but these errors were encountered:
Sometimes the native function
document.elementFromPoint(x, y);
can returnnull
under normal usage scenarios - e.g. if the element is dragged off-screen - as some browsers (Chrome for mobile is one I encountered issues with) will not return an element if the x, y coords are outside the current viewport.However, the default elementFromPoint implementation included in the mobile-drag-drop library does not return
null
if the element returned by the native function isnull
, instead it returnsundefined
. This causes issues further down the line as there arenull checks
but notundefined
checks.Example:
This function can be overwritten in the config so it's not a blocker but still might be worth looking at.
The text was updated successfully, but these errors were encountered: