Closed Bug 418689 Opened 16 years ago Closed 16 years ago

Google spreadsheet context menus are not working consistently

Categories

(Core :: Widget: Cocoa, defect, P2)

PowerPC
macOS
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: wpanther, Assigned: jaas)

References

(Depends on 1 open bug, )

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; ru; rv:1.9b3) Gecko/2008020511 Firefox/3.0b3
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; ru; rv:1.9b3) Gecko/2008020511 Firefox/3.0b3

Spreadsheets in FF3 don't trigger context menus when expected.

1) When right-clicking in the middle of a single cell, menus do not appear. They ONLY appear is 
2) When multiple cells are selected, menus do not appear on right-click either

I did not have any issues with context menus in FF2 under Mac.

Reproducible: Always

Steps to Reproduce:
1. Open new google spreadsheet
2. Select multiple cells
3. Right-clink on selected cells
Actual Results:  
No context menu

Expected Results:  
Google spreadsheet context menu
sorry, made incomplete description for single-cell scenario: menu DO appear only if one right-clicks on the edge of the cell.
I'm able to reproduce what you report, even in the latest nightlies.

It could be a focus bug, or it might be something else.  In any case
it doesn't happen in Windows, so I assume this is a Cocoa widgets bug.

In my tests ctrl+click always works fine.  So there is an easy
workaround.

I suspect this shouldn't block the Firefox 3 release.
Assignee: nobody → joshmoz
Component: General → Widget: Cocoa
Product: Firefox → Core
QA Contact: general → cocoa
Version: unspecified → Trunk
Confirming based on comment 2 (and because I don't see any obvious dupes). If this is fixed by another bug, we can resolve it as a dupe of that bug when it happens.

Also, requesting blocking because this is a regression from Firefox 2 and, even if there is a workaround, it's not standard practice for those with two (or more) mouse buttons to know to ctrl-click instead of right clicking (and all desktop Macs ship with a mouse with two buttons).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking1.9?
Keywords: regression
Flags: blocking1.9? → blocking1.9+
Priority: -- → P2
Flags: blocking1.9+
Flags: tracking1.9+
Assignee: joshmoz → smichaud
I'm having a hard time deciphering the obfuscated Google Spreadsheet code, but I noticed some things about mouse events that might be relevant:

In Firefox 2, "mousedown" precedes "contextmenu" for both right-click and ctrl+click.  Trunk matches Firefox 2 for right-click, but for ctrl+click, "contextmenu" precedes "mousedown".

In Firefox 2, calling preventDefault on the "mousedown" event does not cancel the context menu or "contextmenu" event.  On trunk, it does cancel them -- but of course only for right-click, because for ctrl+click the "contextmenu" event comes first.

I have no idea what is "correct" here.  See also bug 186356, bug 200556, 
bug 238008, and bug 326543.

I also noticed that Google Spreadsheet cell context menus appear only when you lift the mouse button, while the browser's own context menus appear as soon as you push the mouse button down.
You can add whitespace back into the Google Spreadsheets code by loading http://www.squarefree.com/shell/shell.html in a debug build of Firefox and typing

  dump(function() { /* paste code here */ })

This makes it slightly easier to read.
(In reply to comment #4)
> In Firefox 2, "mousedown" precedes "contextmenu" for both right-click and
> ctrl+click.  Trunk matches Firefox 2 for right-click, but for ctrl+click,
> "contextmenu" precedes "mousedown".

I think they just found (and will fix) this in bug 416390.
The patch in bug 416390 comment 9 doesn't have any affect on Google Spreadsheets, fwiw.  Canceling a "mousedown" event only cancels the corresponding "contextmenu" event for right-clicks, even though the "mousedown" event now comes first for both right-clicks and ctrl+clicks.
Assignee: smichaud → joshmoz
I've been profiling our behavior from widget and I don't see any problems. All of the events that we should be generating are getting generated, in the right order (the widget patch in bug 416390 has landed). I doubt this bug is in widgets.
Kev, got another bug here where we're stuck without Google's help.  Can you rope them in and find out exactly what they are doing in their obfuscated code?
Attached patch fix v1.0 (obsolete) — Splinter Review
We are incorrectly sending two right mouse up events into gecko for each real right mouse up event. That is causing the context menus in google apps to open and quickly close again. Get rid of the call to super in rightMouseUp:, we already ensure correct routing at the beginning of the method. The super call is left over from a really long time ago.
Attachment #314385 - Flags: review?(smichaud)
Comment on attachment 314385 [details] [diff] [review]
fix v1.0

I haven't tested this, but I do think your reasoning is correct.

By the way, you should also drop the "handled" variable and the "if
(!mGeckoChild)" conditional :-)
Attachment #314385 - Flags: review?(smichaud) → review+
Attached patch fix v1.1Splinter Review
oops, accidentally posted my debug patch not the final one
Attachment #314385 - Attachment is obsolete: true
Attachment #314389 - Flags: superreview?(vladimir)
Attachment #314389 - Flags: superreview?(vladimir) → superreview+
landed on trunk
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
verified fixed using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9pre) Gecko/2008041504 Minefield/3.0pre. I verified by opening context menus in an existing Google spreadsheet.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: