for 48250, turn off mouse capture when a drag gesture begins. r=mjudge.

This commit is contained in:
pinkerton%netscape.com 2000-08-14 22:29:03 +00:00
Родитель fc367b8a1a
Коммит e2aeb68cee
2 изменённых файлов: 12 добавлений и 6 удалений

Просмотреть файл

@ -756,6 +756,9 @@ nsEventStateManager :: GenerateDragGesture ( nsIPresContext* aPresContext, nsGUI
mCurrentTarget = mGestureDownFrame; mCurrentTarget = mGestureDownFrame;
nsCOMPtr<nsIContent> lastContent; nsCOMPtr<nsIContent> lastContent;
if ( mGestureDownFrame ) { if ( mGestureDownFrame ) {
// the mouseDown captures the mouse, make sure we release it so that dragging
// to other views works correctly.
mGestureDownFrame->CaptureMouse ( aPresContext, PR_FALSE );
mGestureDownFrame->GetContentForEvent(aPresContext, aEvent, getter_AddRefs(lastContent)); mGestureDownFrame->GetContentForEvent(aPresContext, aEvent, getter_AddRefs(lastContent));
if ( lastContent ) if ( lastContent )
lastContent->HandleDOMEvent(aPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status); lastContent->HandleDOMEvent(aPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status);

Просмотреть файл

@ -756,6 +756,9 @@ nsEventStateManager :: GenerateDragGesture ( nsIPresContext* aPresContext, nsGUI
mCurrentTarget = mGestureDownFrame; mCurrentTarget = mGestureDownFrame;
nsCOMPtr<nsIContent> lastContent; nsCOMPtr<nsIContent> lastContent;
if ( mGestureDownFrame ) { if ( mGestureDownFrame ) {
// the mouseDown captures the mouse, make sure we release it so that dragging
// to other views works correctly.
mGestureDownFrame->CaptureMouse ( aPresContext, PR_FALSE );
mGestureDownFrame->GetContentForEvent(aPresContext, aEvent, getter_AddRefs(lastContent)); mGestureDownFrame->GetContentForEvent(aPresContext, aEvent, getter_AddRefs(lastContent));
if ( lastContent ) if ( lastContent )
lastContent->HandleDOMEvent(aPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status); lastContent->HandleDOMEvent(aPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status);