Is it possible to get the caret position after a file has been dragged into the browser?

When a file is dragged into the browser, as you drag over a contenteditable the caret moves around under the cursor. This suggests to the user that when dropped, the file will be placed at the caret.

Unfortunately, in my event handlers, I can only get the last known selection prior to the drag event. I can’t get a selection value that corresponds to the caret’s position due to the drag. Is it possible to get this value? If this is not possible, is there some way to disable caret moving on drag over behavior in the first place?

Looks like maybe the solution is to use and then move the selection there as part of the update.

Yes, that’s pretty much how this is done.