Closed Bug 70274 Opened 24 years ago Closed 21 years ago

right-clicking should cancel link/text drag

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P2)

x86
Windows 98
defect

Tracking

()

RESOLVED FIXED
mozilla1.4alpha

People

(Reporter: jruderman, Assigned: deanis74)

References

(Blocks 1 open bug)

Details

(Keywords: topembed+)

Attachments

(1 file, 1 obsolete file)

2.24 KB, patch
emaijala+moz
: review+
jag+mozilla
: superreview+
Details | Diff | Splinter Review
Steps to reproduce:
1. Select some text, or find a link to drag.
2. Drag it anywhere (within current window, over desktop, etc.) but don't drop 
it yet.
3. Right-click.

Result: nothing happens when I right-click.
Expected result: right-click should stop the drag.

(Pressing escape does stop the drag.)
Blocks: 70279
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla0.9.1
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Well, we can't process events during a drag.  Until we can...
Target Milestone: mozilla0.9.2 → Future
Blake, is there a bug about being able to process events during a drag that this
bug can be marked as depending on?
-> event handling
Assignee: blaker → joki
Status: ASSIGNED → NEW
Component: XP Apps: Drag and Drop → Event Handling
QA Contact: tpreston → madhur
Target Milestone: Future → ---
interesting thing is that I can cancel the drag by hitting the ESC key, so, we
must be handling *some* events during drag.
Keywords: topembed-
Target Milestone: --- → mozilla1.2
QA Contact: madhur → rakeshmishra
Blocks: 177006
plusing per edt
Keywords: topembed-topembed+
QA Contact: rakeshmishra → trix
Is this really a topembed+ bug?

->radha, should be easy to just check for the right click event during the drag
and cancel the drag since we're capturing mouse events at that point anyway
Assignee: joki → radha
Status: NEW → ASSIGNED
Target Milestone: mozilla1.2alpha → mozilla1.3beta
I can't get this in before next tuesday. I'm still recovering from the timeoff.
Target Milestone: mozilla1.3beta → mozilla1.4alpha
In both windows and linux, when I press the right button while a drag is in
session, the native DragDropOver callbacks are called. No event for the right
button down, up or click is generated. No event is generated for any key presses
also except for the 'Esc' key.  This makes me want to believe that after the
mouse is grabbed for the drag operation, the OS does not pass on events to the
browser except for those that  exits the drag operation like the  'Esc' key
event and the left button up.  I see this behavior in both linux and windows. 

In linux, other applications also do not respond to the right button down while
a drag is on, like the text editor application and the directory viewer. However
in windows other native applications like the windows explorer and IE do respond
to right button down and cancel the drag.  
Based on my previous comment, I don't see a way to fix this. Marking Won't fix. 
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → WONTFIX
I'm going to take a look at this.  IE6 supports this behavior, so it's
definitely possible.  I have an idea or two of how this may be possible.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Mine.
Assignee: radha → dean_tessman
Status: REOPENED → NEW
Attached patch patch (obsolete) — Splinter Review
This does it.

1. It pops up a context menu when you release the right mouse button, but
that's pretty much in line with our not eating clicks policy.
2. You can't start a drag if you already have the right button down, but that
doesn't make sense anyway.  I could get around this by introducing a member
variable that knows whether the right button was down or not, but I really
don't see the benefit.
Comment on attachment 115959 [details] [diff] [review]
patch

Ere, can you review this?
Attachment #115959 - Flags: review?(ere)
Looks good, but I've yet to actually test it.
Comment on attachment 115959 [details] [diff] [review]
patch

Actually it doesn't do what I think it should. Clicking the right button while
dragging should cancel the drag and not end it, right?
Attachment #115959 - Flags: review?(ere) → review-
Comment on attachment 115959 [details] [diff] [review]
patch

Hee hee.  Whoops!
Attachment #115959 - Attachment is obsolete: true
Attached patch patch v2Splinter Review
cancel the drag, don't complete it
Comment on attachment 116052 [details] [diff] [review]
patch v2

Ere, this one's better.  Right-click is now handled in the same check as esc
being pressed.
Attachment #116052 - Flags: review?(ere)
Comment on attachment 116052 [details] [diff] [review]
patch v2

Yep, that's better :) r=ere@atp.fi
Attachment #116052 - Flags: review?(ere) → review+
Comment on attachment 116052 [details] [diff] [review]
patch v2

Jag, can you sr= this simple addition?
Attachment #116052 - Flags: superreview?(jaggernaut)
Comment on attachment 116052 [details] [diff] [review]
patch v2

sr=jag
Attachment #116052 - Flags: superreview?(jaggernaut) → superreview+
checked in
Status: NEW → RESOLVED
Closed: 22 years ago21 years ago
Resolution: --- → FIXED
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: