From what I understood, the bug was that the previous code would not make use of originalEvent.changedTouches[0] if originalEvent.touches was empty - Which is incorrect behavior in the case of a dropon event.
In reality, it is possible to have an empty originalEvent.touches array, and yet have some originalEvent.changedTouches (I.e. Immediately after the finger is lifted from the touchscreen).
My fix is inspired by this one here: https://github.com/whatisjasongoldstein/jquerypp/commit/1e04f542683c3b2ea7186abe3301dd7a47bdc921 That fix introduced redundancies and didn't solve the problem cleanly, so I improved it.
From what I understood, the bug was that the previous code would not make use of originalEvent.changedTouches[0] if originalEvent.touches was empty - Which is incorrect behavior in the case of a dropon event.
In reality, it is possible to have an empty originalEvent.touches array, and yet have some originalEvent.changedTouches (I.e. Immediately after the finger is lifted from the touchscreen).