DnD Drop on Table headers area detection?

Is there any way to detect that a drop has occurred on the Table headers? I can’t figure out how to differentiate a drop below the last item in my table, which I’d like to move to the end, versus a drop on the Table header, which I’d like to move to the top.

Dragging can require rather precise movements, and these seem to be places people drop to when trying to move to the top or bottom the table.

One solution I have now is that if the targetItemId (dropData.getItemIdOver()) is NULL and I have nothing in my Table, then I add it, otherwise I ignore it (and don’t do any moves) and require a more precise drop.

Another solution is to treat a NULL targetItemId as meaning TOP or BOTTOM, both of which work, but are non-intuitive “half of the time” because if I say TOP, and they drag below the last row in the Table, it goes to the top when they clearly meant bottom; and vice versa.

Is there any way to detect the difference between “too high” and “too low” drops like these so I can put them in the right place?

Thanks for any ideas!

Maybe if I reword the question, it will be more clear.

Today, if you allow a Table to be a Drop location, Vaadin allows the drop to take place on the header or below the last row shown in the table (and presumably in the table’s footer, but I don’t use table footers yet).

I know this because it calls my DropHandler’s drop() method when I do this. Is there a way to differentiate between these two locations for the drop? It seems like there should be some way to know if it’s dropped above the first row versus below the last row. I’m not sure what I should be checking.

I see in the debugger that the AbstractSelectTargetDetails returned from the DragAndDropEvent has a map with a “mouseEvent” attribute that appears to have the X,Y offsets, but not sure if there’s a correct way to retrieve those coordinates, nor how I could determine those same coordinates for my Table’s header area so I can check it myself.

Is this possible with DnD now?