Open Bug 89308 Opened 23 years ago Updated 2 months ago

Open context menus on mousedown in Windows

Categories

(Core :: XUL, enhancement)

x86
Windows 98
enhancement

Tracking

()

Future

People

(Reporter: binarycowboy, Unassigned)

References

Details

Attachments

(1 obsolete file)

This is a continuation from bug 49844.  While that bug has turned into a general
holy war about whether or not context menus should even appear on mouse down,
this bug should be to discuss patches that allow mouse down behavior in windows.
The current patch up for scrutinizing is available here:
http://bugzilla.mozilla.org/showattachment.cgi?attach_id=41135 (created as an
attchment to 49844)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Certainly the current implementation is wrong because a right-drag shows the
context menu for the target. I'm sure it would be easier just to open the menu
on the mouse down since browsers don't need to right-drag, do they?
those kinds of questions should go in bug 49844, this bug is for discussing
actual patches (as in, "hey, that patch sucks because it slows down the browser
by 30%").
To re-emphasize what Brian said for all to read, this bug is not for discussion
of mouse-down vs. mouse-up.  Bug 49844 became useless because of all of the crud
in it.  This bug exists because there is a potential patch that needs further
investigation.  Take discussions of the interface to n.p.m.ui if you need to.
Keywords: patch, review
*** Bug 49844 has been marked as a duplicate of this bug. ***
Bug 49844 blocked bug 16766.  Should this bug block 16766?
No.  Bug 16766 morphed into a linux-only bug, and was fixed.
Target Milestone: --- → Future
Transferring keywords from bug 49844, since it was marked as a dup of this one.

Reading the patch, two questions. First, why are you referencing a pref? Is 
anyone who prefers the current behavior going to be using the patch anyway?

Second, the patch doesn't seem to contain code for opening on Shift+F10 or the 
context menu key on the keyboard. You'll need to take care of both of those if 
you're reimplementing WM_CONTEXTMENU, right?
Assignee: pinkerton → binarycowboy
Keywords: 4xp, mostfreq
Summary: Context menus on mouse down in windows. → Open context menus on mousedown in Windows
The context menu key code looks to still be in there:

         case WM_CONTEXTMENU:
         ....
+            if (lParam == 0xFFFFFFFF){
+                result = DispatchMouseEvent(NS_CONTEXTMENU_KEY);

I'm not sure if this is what handles Shift+F10 as well.  Brian, have you tested 
to make sure you can still pop up a context menu with the keyboard, using both 
Shift+F10 and the context menu key?

As for the pref, I think that due to the opposition from certain parties of 
moving this behavior from mouse-up to mouse-down, the only way to get this code 
in would be to make it optional.
*** Bug 95392 has been marked as a duplicate of this bug. ***
*** Bug 99486 has been marked as a duplicate of this bug. ***
*** Bug 99708 has been marked as a duplicate of this bug. ***
Windows users might actually need right-drag for bug 76537 (Gestures).  There's 
a work in progress implementation (http://optimoz.mozdev.org).

Personally, I do think onMouseDown is appropriate for the context menu, but 
would request that this be configurable -- not in the prefs panel, but at some 
lower level, so that if a user could choose to use gestures and bind them to 
right-click-drag, the context menu could be set to mouseUp.
*** Bug 104655 has been marked as a duplicate of this bug. ***
*** Bug 105376 has been marked as a duplicate of this bug. ***
[Aufbau-P3]: context menus are important for surfing with one hand, which in
turn is important for porn surfing.
Whiteboard: [Aufbau-P3]
Whiteboard: [Aufbau-P3]
*** Bug 121763 has been marked as a duplicate of this bug. ***
*** Bug 137046 has been marked as a duplicate of this bug. ***
Personally I'd like to have this configurable (even a hidden prev), because I
like the windows behavior and I'd like to have on linux also.

Someday I'd like to have drag'n'drop using the right button instead of the left...
see bug 25742
As seen in bug 49844 and others, both Netscape 4.x and Microsoft Office (XP
included) are showing:
- sometimes a context menu on mousedown (for example toolbars)
- sometimes a context menu on mouseup (for example text editing)

Everyone (that I can see) agrees the mousedown way is more usable. So the
correct behaviour seems to me:
- when mousedown is required for something else (dragging something, mouse
gestures activated, ...) the context menu should fire on mouseup
- everywhere else it should appear on mousedown

So I don't think there should be a "global pref", there are cases described when
mousedown is *not* possible. But where it is possible, mousedown is definately
*better*. 
*** Bug 163591 has been marked as a duplicate of this bug. ***
*** Bug 167271 has been marked as a duplicate of this bug. ***
So, how'd we move on with this bug? Making a hidden pref sounds reasonable to
me, since then the bug 167271 could be also be fixed by changing this pref with
gestures installation. 

I saw many complains about it on Newsgroups: netscape.netscape7.windows.

Any thoughts?
*** Bug 185103 has been marked as a duplicate of this bug. ***
*** Bug 212658 has been marked as a duplicate of this bug. ***
*** Bug 210690 has been marked as a duplicate of this bug. ***
Component: XP Toolkit/Widgets: Menus → XUL
QA Contact: jrgmorrison → xptoolkit.widgets

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: binarycowboy → nobody
Severity: normal → S3
Attachment #9384295 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: