Bug 815943 - prevent drag detection while invoking preventDefault() on touch move event. r=smaug.

This commit is contained in:
Shih-Chiang Chien 2012-11-28 12:01:21 +08:00
parent 7a46f5d112
commit 280aa86dd0

View File

@ -3032,6 +3032,14 @@ NS_IMETHODIMP nsFrame::HandleDrag(nsPresContext* aPresContext,
frameselection->StopAutoScrollTimer();
#ifdef MOZ_B2G
// We only check touch move event since mouse move event is not cancelable.
if (aEvent->message == NS_TOUCH_MOVE &&
nsEventStatus_eConsumeNoDefault == *aEventStatus) {
return NS_OK;
}
#endif // MOZ_B2G
// Check if we are dragging in a table cell
nsCOMPtr<nsIContent> parentContent;
int32_t contentOffset;