Closed Bug 367303 Opened 18 years ago Closed 18 years ago

Right-click brings up context menu but doesn't focus the window

Categories

(Core :: Widget: Cocoa, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bzbarsky, Assigned: jaas)

References

Details

BUILD: Current trunk build

STEPS TO REPRODUCE:
1)  Hook up a multi-button mouse to your mac
2)  Start firefox
3)  Load any page with a link on it (e.g. this bug page)
4)  Focus some other app while keeping said link visible (e.g. click on
    desktop and make sure no Finder windows are open).
5)  Right-click on the link without focusing the Firefox window first

ACTUAL RESULTS:  Context menu comes up, but the Firefox window is not focused.  The context menu options sometimes work, sometimes not.  There's no feedback as you hover over said menu options.

EXPECTED RESULTS:  One of two possibilities.  Either act like Finder does on right-click, and focus the window when bringing up the context menu.  Or act like pre-cocoa-widget Firefox does and focus the window without bringing up the context menu.  Either way, focus the window I clicked in, dammit!
This seems eerily familiar to another Cocoa widget bug I'd read at one point, but I can't find it now.  The closest I come is bug 339945, which doesn't seem like it's exactly this bug....
That bug might be pretty much the same... I'll add a dep.
Depends on: 339945
No mac apps steal focus if you just right-click a window (the Finder doesn't count; it's not a normal application).

From some testing, I gather that the correct behavior is actually to bring up the context menu but not focus Firefox. If an item in the contextmenu is chosen, the app should take focus.
> the Finder doesn't count; it's not a normal application

Heh.  Fair enough.  I did check that Safari doesn't take focus.

> is actually to bring up the context menu but not focus Firefox

I'm fine with that if the context menu functions.  But right now it doesn't.
(In reply to comment #3)
> No mac apps steal focus if you just right-click a window (the Finder doesn't
> count; it's not a normal application).
> 
> From some testing, I gather that the correct behavior is actually to bring up
> the context menu but not focus Firefox.

Um, is the behavior different for ctrl-click vs right-click in the OS, or different in 10.4?  

Every app (aside from Finder) I have open right now becomes active when I ctrl-click on one of its windows (or a link in said window) and *doesn't* invoke the CM...

*Unless* there's a selection in that app and you ctrl-click on the selection; in that case, you get a CM but the app remains background.

I tested Camino, Colloquy, Stickies, and Safari.
(In reply to comment #5)
> Um, is the behavior different for ctrl-click vs right-click in the OS,

Yes.

Ctrl-click focuses, right click doesn't.
> is the behavior different for ctrl-click vs right-click

Over here, yes.  That's why step 1 of the steps to reproduce is important.
Since this bug is about the focus behavior, and the current behavior seems to be correct, closing as WFM.

We should file separate bugs on the lack of context menu feedback (hilighting) and persistance.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
Bah.  I've filed bug 368077, but thanks a lot for wasting my time!
You need to log in before you can comment on or make changes to this bug.