Closed Bug 1648939 Opened 4 years ago Closed 4 years ago

Clicking navigation bar buttons on macOS triggers appearance and disappearance of menu in the wrong location

Categories

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

77 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla80
Tracking Status
firefox80 --- verified

People

(Reporter: matija, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached video firefox.mp4

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15

Steps to reproduce:

Clicked the Bookmarks/History/etc button in the navigation bar or the general Menu button (top right).

Actual results:

A dropdown/popup menu appears and disappears swiftly in the wrong place, to be followed by the re-appearance of the same menu in the correct spot.

Expected results:

The normal dropdown should have appeared.

Summary: Clicking navigation bar buttons on macOS triggers weird effect → Clicking navigation bar buttons on macOS triggers appearance and disappearance of menu in the wrong location

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Widget: Cocoa
Product: Firefox → Core

Could you run mozregression[1] to see when this started happening? If you have never run mozregression before, simply run these three commands in a Terminal window:

sudo easy_install pip
sudo pip install -U mozregression --ignore-installed
mozregression --good 2017-01-01

A number of Firefox versions will open in succession to narrow down when this started occurring. Simply type "good" or "bad" in Terminal based on whether or not a build reproduces the bug. Once finished, please post the output from the last run. It should give a last good and first bad revision as well as a link to look at the changesets in that range. Thank you!

[1] https://mozilla.github.io/mozregression/

Severity: -- → S3
Flags: needinfo?(matija)
Priority: -- → P2

Here's the output

12:06.59 INFO: Last good revision: e76dbab2aea8354660281221c1aa08356107881c
12:06.59 INFO: First bad revision: e6eb852a873940ea78c2a588bfefc6bee72f03c3
12:06.59 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=e76dbab2aea8354660281221c1aa08356107881c&tochange=e6eb852a873940ea78c2a588bfefc6bee72f03c3

Flags: needinfo?(matija)

(In reply to Matija Munjakovic from comment #3)

Here's the output

12:06.59 INFO: Last good revision: e76dbab2aea8354660281221c1aa08356107881c
12:06.59 INFO: First bad revision: e6eb852a873940ea78c2a588bfefc6bee72f03c3
12:06.59 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=e76dbab2aea8354660281221c1aa08356107881c&tochange=e6eb852a873940ea78c2a588bfefc6bee72f03c3

This isn't necessarily the type of change I was expecting, but maybe there is some dependency that wasn't accounted for? Andrei, could you take a look?

Flags: needinfo?(andrei.br92)
Regressed by: 1597706

I can reproduce the issue in release and nightly where the doorhangers are sometimes flickering when opening.
I can't really tell how this is related to the regression range. I tried to see if there's some accidental click hijacking from another button but didn't get too far.
@Gijs is there some logging pref similar to browser.uiCustomization.debug to get some more info?

Flags: needinfo?(andrei.br92) → needinfo?(gijskruitbosch+bugs)

(In reply to Andrei Oprea [:andreio] from comment #5)

@Gijs is there some logging pref similar to browser.uiCustomization.debug to get some more info?

This feels like a layout/graphics/widget thing more than a frontend thing, so I'm not sure what logging would help. I am pretty skeptical about the regression window, so I ran mozregression myself. I ended up finding bug 1597160 as the regressor (in a fairly similar window), which seems a lot more plausible, given that what appears to happen is we start painting the panel (ie widget-level window) in the wrong position, and then it "snaps" to the correct one.

Emilio, can you take a look?

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(emilio)
Regressed by: 1597160
No longer regressed by: 1597706
Has Regression Range: --- → yes

I'm not on a mac right now, but if you are, is there any chance you could give the attached patch a try and confirm it fixes the issue?

Flags: needinfo?(gijskruitbosch+bugs)
Flags: needinfo?(emilio)
Flags: needinfo?(andrei.br92)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #8)

I'm not on a mac right now, but if you are, is there any chance you could give the attached patch a try and confirm it fixes the issue?

The patch appears to fix it for me, yes!

Flags: needinfo?(gijskruitbosch+bugs)

Can also confirm the fix, thanks!

Flags: needinfo?(andrei.br92)
Assignee: nobody → emilio
Status: NEW → ASSIGNED

Great, I don't know why this wasn't a problem before bug 1597160 tbf, but the code is obviously incorrect.

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/da4d1487733b
Ensure that the widget starts with the correct opacity / transform. r=mstange
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
Flags: qe-verify+

Confirmed issue with 79.0a1 (2020-06-22) on macOS 10.15.5.
Fix verified with 81.0a1 (2020-08-10) and 80.0b6.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: