Closed Bug 1601726 Opened 4 years ago Closed 4 years ago

Right click menu opens in the wrong place on Mac with multiple monitors while in full screen mode or in a window with a width exceeding a certain amount

Categories

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

71 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1592416

People

(Reporter: nick, Assigned: haik)

Details

Attachments

(1 file)

Issue is similar to one previously reported. I first noticed it on Firefox 70. Current setup is as follows:

  1. Macbook Pro (13-in, 2017 model)
  2. Monitor connected through eGPU (Sonnet eGFX Breakaway Puck Radeon RX 560 External GPU ) via HDMI
  3. Monitor connected through same eGPU via DVI.

Steps to reproduce:

  1. Open website through Firefox in any of the external monitors.
  2. Right-click on, say, a link. At times, the first time I right-click on a link it opens correctly where the mouse is. If so, repeat step 2 on another link
  3. Note: the right-click menu appears on the laptop's screen.

Full screen is not necessary for this bug to show up. Also, the right-click menu has to be generated by Firefox, not by the browser window itself (as in the case of some website like GMail).

+++ This bug was initially created as a clone of Bug #1306633 +++

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:51.0) Gecko/20100101 Firefox/51.0
Build ID: 20160930004005

Steps to reproduce:

  1. Have multiple monitors active (2 external, 1 Macbook for my setup)
  2. Full screen the Firefox window on my Macbook
  3. Right click anywhere on the screen in the Firefox window

Actual results:

The right click menu opens up in different places.
If I right-click near the top left, the menu will open closer the middle.
If I right-click in the middle, the menu will open up to the far right.

After the Firefox browser reaches a certain width, any right click will open up a menu that's completely out of position (sometimes popping up in a different browser), and no where near the cursor's position at the time of right clicking.

See picture attached. I right click near the middle of the screen, but the menu pops up near the bottom right.

This happens when I'm using multiple monitors.

Expected results:

When right-clicking in the browser, the option menu should appear to the right and under the cursor.

Seems to be another manifestation of:
https://bugzilla.mozilla.org/show_bug.cgi?id=245418

I noticed this bug during v51.0a2 of Firefox Developer Edition.
I currently use OS X El Capitan Version 10.11.3, MacBook Pro Retina 15-inch

Priority: -- → P2

Hi,

just came here to give my two cents:
I have same super annoying issue, though I haven't noticed any difference on the behavior with different widths of the browser. This happens to me every time when using Firefox in an external monitor. Right-click menu always shows on the MBP screen.

System:
MacBook Pro (15-inch, 2018)
macOS Catalina 10.15.3
Firefox 72.0.2 (64-bit)

Hi,

I have the same issue on my MacBook Pro.
I have two screens : my MacBook screen and an external screen, both with different resolution.

When I move Firefox on my external screen, all right-click menus, bookmark folders and tooltips are displayed the first time I open them on correct screen and other times on my MacBook screen (but with a correct relative position on the screen).
No problem when Firefox is on my MacBook Pro screen.

I tried to change my main monitor in macOS settings and the issue is inversed: Firefox works fine on my external monitor and have the dropdown / tooltip issue on my MacBook screen.

I have this issue since I upgrade my MacBook to macOS Cataline but only with Firefox.

System:
MacBook Pro (15-inch, mid-2014)
macOS Catalina 10.15.3
Firefox 73.0 (64-bit)

Severity: normal → S3

This sounds a lot like bug 1592416 which we are close to having fixed. Closing as a dupe of bug 1592416.

As a workaround, try right-clicking on the Firefox dock icon, choosing Options, and setting "Assign To" to None. See attached screenshot. So far, I have only see this problem when Firefox has been assigned to a particular workspace.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE

Hi Haik,

Alas, I don't have the option to assign Firefox to a specific workspace, or to none. So, I'm fairly sure the issue has nothing to do with workspaces. My guess, the issue stems from the rendering engine, maybe in the switch to Core Animation there's something in the rendering engine that prefers the native display over the attached displays?

Hmm.. looking over at the other bug report, I think I know where the root cause stems from. The reason you likely weren't able to reproduce the issue except in assigning to a particular workspace is because, by default, there's only one default workspace. I think there's something in the rendering code that's causing the right-click menu to assume that, if no explicit workspace is defined, to default to the first one. Which, it looks like, seems to be the default MacBook Pro monitor dimensions. A funny quirk I noticed of this bug is that, since my monitors are of vastly different sizes ( MacBook Pro: 2560 x 1600, monitor #2: 1920 x 1080 and monitor 3: 2560 x 1440), there are areas I right-click on the second monitor where the right-click menu will appear either on my laptop screen or on my second monitor (but in the wrong position).

In any case, adding an additional workspace to my desktop, following your steps, and then removing the additional workspace has fixed the issue (at least until I restart, we'll see what happens then). Highly recommend you go over the code to see how workspaces are being used between the right-click menu functionality and Core Animation. Definitely think the answer's along those lines.

Hopefully, this helps.

(In reply to nick from comment #6)

Thanks for the details, Nick. It sounds like we might have another problem here. Once we have a fix on Nightly for bug 1592416, I hope we can narrow down what's happening and debug the case you're describing. I have not tested with 3 displays like in your configuration and I can't rule out a rendering problem versus a widget/NSWindow problem right now.

macOS appears to implement full screen by making a new workspace for the app which could explain the workspace interaction, but my understanding is that you are not using full screen at all when hitting this. (And no workspaces.)

I can reproduce this problem with two displays (total) and no workspaces if I first create a workspace, then assign Firefox to a display, then remove the workspace. That sounds similar to what you described. After the workspace is removed, the option to assign to a desktop is no longer available in the dock icon menu.

When you open a new window and right click, does the right click menu always show up in the correct place the first time?

I'll leave this bug open for now. If the problem comes back, please update the bug.

Assignee: nobody → haftandilian
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: DUPLICATE → ---

@Nick, now that we have a fix for bug 1592416 in Nightly and Beta (as long as it is version 78), would you be able to test with one of those versions to see if the problem is still reproducible for you?

Flags: needinfo?(nick)

(In reply to Haik Aftandilian [:haik] from comment #8)

@Nick, now that we have a fix for bug 1592416 in Nightly and Beta (as long as it is version 78), would you be able to test with one of those versions to see if the problem is still reproducible for you?

Cool! Will test tonight (at work under a deadline as well, so can't take time to test it just now)

BTW, when last we spoke I removed the additional workspace, and so far Firefox works as expected: all windows are opening on their respective monitors, right-click works as expected. So, definitely the root cause is along the lines we had previously discussed.

Thanks again!

Flags: needinfo?(nick)

Closing this as a dupe of bug 1592416. We can re-open the bug if necessary.

Status: REOPENED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: