Open Bug 398196 Opened 17 years ago Updated 2 years ago

Right-clicking on a combo box (in a popup window) can have bad results

Categories

(Core :: XUL, defect)

PowerPC
macOS
defect

Tracking

()

People

(Reporter: smichaud, Unassigned)

References

()

Details

This bug has been hived off from bug 392389, and reports a separate,
unrelated problem with the test case from bug 392389.

This problem is OS-X-specific, and occurs when the user right-clicks
on a combo box in a popup window.  But the problem can't be addressed
in OS X widget code (i.e. Cocoa widget code), because widget code
doesn't know enough to be able to fix the problem.  (Widget code
doesn't know which GUI objects can have context menus and which GUI
objects can't have context menus.)

Similar problems may arise with other objects (not just a combo box in
a popup window).  But so far this is the only kind of object I've
tested with.

In general OS X does a good job of deciding which GUI objects can have
context menus and which can't.  But Cocoa widgets uses non-native
counterparts of some native controls (one example is the combo box).
OS X doesn't know what kind of objects these are.  So OS X can't be
relied on to know whether or not to raise a context menu when the user
right-clicks (or ctrl-clicks) on a non-native GUI object.  And
sometimes OS X makes the "wrong" decision.

The problems reported here arise because Gecko gets confused when it
receives an NS_CONTEXTMENU event that it doesn't expect.  Presumably
this is because Gecko "thinks" that the object the user has clicked on
can't have a context menu.

Here are steps to reproduce the problem(s):

1) Load the testcase (attachment 276885 [details]) and click on the
   Open button to display the popup window containing the (as yet
   unopened) combo box.

2) Right-click on the combo box.

   Nothing appears to happen.  But from this point forward
   left-clicking on the (unopened) combo box produces the wrong result
   -- it makes the combo box disappear.

   This keeps happening even after you click the Open button to make
   the combo box reappear (in its popup window).  Changing the focus
   to another window or app and back doesn't help.

   The problem doesn't happen in a new browser window ... until you
   right-click on the combo box (in its popup window) above that
   window.
Flags: blocking1.9?
I'm having a lot of trouble understanding what the actual issue is here, or why you think this isn't a widget bug. The same testcase works fine when ctrl+left clicking. Are you saying that OSX requires an indication of whether a context menu would open as a result of a context menu event? I don't understand why you need to know whether a context menu could be opened or not.

And can you be clear of what you mean by 'Gecko'? That term is fairly vague and the code in widget/src/cocoa also falls under this term. I'm guessing you mean 'layout' code.
 
Flags: blocking1.9? → blocking1.9-
Assignee: enndeakin → jag
Assignee: jag → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.