Open Bug 40068 Opened 24 years ago Updated 2 years ago

click to cancel context menu triggers onmouseup

Categories

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

x86
Windows 98
defect

Tracking

()

Future

People

(Reporter: jruderman, Unassigned)

References

(Blocks 1 open bug, )

Details

1. load attachment to bug 39985
2. right-click in the light gray area (some events should come up)
3. with context menu still up, right-click somewhere else in the light gray area

actual result: onmouseup triggers
expected result: no more events trigger
Blocks: 39985
Yep, this happens using the 2000-05-22-08-M16 nightly binary on WinNT.
http://bugzilla.mozilla.org/showattachment.cgi?attach_id=8919

I'd guess that it would be the responsibility of the context menu code to
fully consume the event that it uses to dismiss the menu, if it is not
to be passed to the objects underlying it.

See bug 15640, "clicking image in content area to close xul popup loads url",
M19, of which this might be a DUP.
Actually I would disagree with the expected results here.  The mousedown is used 
to dismiss the menu and the afterward the mouseup occurs.

However, I would suggest the based on 4.x behavior and based on how the initial 
menu comes up that we should in fact get all the events and that the second 
right click should in fact immediately bring up a new context menu at the new 
location.  Reassigning this to context menu guys.
Assignee: joki → saari
Ok, *if* the second right-click were to bring up a new content menu, *then* it 
would make sense to trigger onmousedown/onmouseup/onclick events.  In most 
Windows programs, the second right-click does bring up a new context menu.

I still think it doesn't make sense to give only onmouseup if all the click 
does is cancel the menu (which is what mozilla does for both left- and right-
clicks that cancel a context menu).  It should either be a full click or 
nothing.  In most Windows programs, a left-click that cancels a context menu 
also functions as a normal left-click.
Okay, this is one of the many window trasition event bugs.
Status: NEW → ASSIGNED
Target Milestone: --- → M18
Target Milestone: M18 → Future
Mass update:  changing qacontact to ckritzer@netscape.com
QA Contact: janc → ckritzer
Since German has decided that clicks that dismiss menus should have no other 
effect (see bug 21390, "Clicking on Widget or link does nothing if menu open"),
the same logic probably caries over to context menus...
Ah, should have thought of this a minute ago, but the same onmouseup event
is logged if a click in the light gray div dismisses a menubar menu. So this
affects *all* menus.
Updating QA Contact.
QA Contact: ckritzer → lorca
Reassigning QA Contact for all open and unverified bugs previously under Lorca's
care to Gerardo as per phone conversation this morning.
QA Contact: lorca → gerardok
QA contact updated
QA Contact: gerardok → madhur
See also bug 89923, click to cancel menu counts toward double click.
QA Contact: madhur → rakeshmishra
QA Contact: rakeshmishra → trix
The desired behaviour documented in bug 66834 comment 77, the onmouseup event
(and the onmousedown event) is correct on windows platforms.  In other words,
the event shouldn't be blocked just because a menu is open.  For Mac and Unix,
the event should be blocked.  I don't have those platforms to test, but it seems
like this may be working correctly?  Or fixed?  Or fixed just on windows?  Or a
duplicate of bugs which were raised later and are being worked on?
Assignee: saari → events
Status: ASSIGNED → NEW
QA Contact: trix → ian
Assignee: events → nobody
QA Contact: ian → events
Component: Event Handling → User events and focus handling
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.