Created attachment 571179 [details] test case Use the provided test case as follows: 1) start dragging the green rectangle 2) drag it over the red rectangle 3) drop it 4) "status" should be "drop" now 5) start dragging the green rectangle again Actual: "status" is "drop dragleave" because this was fired again on sLastDragOverFrame (the red rectangle) from the previous dnd operation. Expected: "status" should still be "drop".
Created attachment 571183 [details] [diff] [review] patch v1 I don't know if that's the right approach but it works for my test case. This patch sets sLastDragOverFrame to null when starting a new drag operation and thus cleaning out the value from previous drag operations.
Enn or smaug would be better reviewers here.
Comment on attachment 571183 [details] [diff] [review] patch v1 Guessing smaug looked at this most recently.
FWIW ISTR this behaviour even before bug 591249 landed.
Would it be better to clear this during the dragend event (in PostHandleEvent)?
Is this a regression? If it is, is it perhaps from bug 591249
Comment on attachment 571183 [details] [diff] [review] patch v1 Neil, could you review this.
(If you don't have time to review, I can review)
(In reply to Neil Deakin from comment #5) > Would it be better to clear this during the dragend event (in > PostHandleEvent)? I assume that wouldn't be suitable when the source node is external to the browser.
Does the bug occur for an external drag? Shouldn't the node be cleared in dragexit? Regardless, there's no harm is clearing sLastDragOverFrame both in dragend and during dragstart. That would make it better in case someone adds some code to check sLastDragOverFrame outside a drag for whatever reason.
Created attachment 571604 [details] [diff] [review] patch v2 I guess it would be sufficient to only clean sLastDragOverFrame in PostHandleEvent[NS_DRAGDROP_DROP] (it's already set to null on NS_DRAGDROP_EXIT) but I kept the change from the first patch to also clean out on dragstart like you said.
Comment on attachment 571604 [details] [diff] [review] patch v2 I'd actually meant to put it in 'dragend' rather than 'drop' but this is probably ok.