Closed Bug 1704070 Opened 4 years ago Closed 4 years ago

[Proton] Right-clicking on the overscroll blank space will toggle the context menu for the elements in the tabs bar, bookmarks bar, etc

Categories

(Core :: Panning and Zooming, defect, P2)

Firefox 89
defect

Tracking

()

VERIFIED FIXED
89 Branch
Tracking Status
firefox87 --- disabled
firefox88 --- disabled
firefox89 --- verified

People

(Reporter: andrei.purice, Assigned: botond)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [mac:ux] )

Attachments

(6 files)

Attached video interraction.mov (deleted) —

Tested on:
Nightly 89.0a1

TestedPlatform:
MacOS 10.14
MacOS 10.15

Have the following pref enabled:
"apz.overscroll.enabled" = "True"

Steps to reproduce:

  1. Open any webpage (i.e. : www.google.com).
  2. Scroll up and down in order to perform the overscroll
  3. Interact with the empty blank overscroll space

Expected Results:
The cursor is static and there is no interaction with the blank overscroll space.

Actual Results:
The cursor's position (even though static) is moved (but not visually) and changes with the length of the scroll.

Notes:
In this video we have scrolled and pressed mouse button 2, in the overscroll area, thus opening context menus from current tab and bookmark options. Though the cursor was stationed the overscroll effect was dragging it upwards.
Not a regression since the feature was added in Nightly 89.

Summary: [Proton] Interaction with the blank overscroll space is possible → [Proton] Right-clicking on the overscroll blank space will toggle the context menu for the elements in the tabs bar, bookmarks bar, etc

After you dismiss the context menu (and lift your fingers from the touchpad completely) the page stays in overscroll too.

This was supposed to have been fixed by bug 1686146, but it looks like it wasn't (I can reproduce). Will investigate.

Assignee: nobody → botond
Blocks: 1686146
Priority: -- → P2

(In reply to Timothy Nikkel (:tnikkel) from comment #1)

After you dismiss the context menu (and lift your fingers from the touchpad completely) the page stays in overscroll too.

It's related to bug 1703705, any incoming events handled by APZ (i.e. calling AsyncPanZoomController::SetState) will prevent from restoring the overscroll state.

On Linux at least, the reason for this is that the widget code dispatches the context menu event to Gecko without respecting the event status returned by APZ.

The diagnosis is likely similar for Mac, but in the Mac widget code.

Hiro, could I get your help with fixing this for Mac? I've already written a test which is failing on Mac, and just needs to be made to pass.

(The Mac fix could be in this bug, or in a different bug in which case I can disable the test on Mac when I land it in this bug.)

Flags: needinfo?(hikezoe.birchill)
Attached patch A patch for Mac (deleted) — Splinter Review

FWIW, with this change on Mac, contextmenu no longer appears by right clicking in overscrolled gutters, but the test still fails for some reasons.

Flags: needinfo?(hikezoe.birchill)

(In reply to Hiroyuki Ikezoe (:hiro) from comment #9)

Created attachment 9215343 [details] [diff] [review]
A patch for Mac

FWIW, with this change on Mac, contextmenu no longer appears by right clicking in overscrolled gutters, but the test still fails for some reasons.

I did comment the failure reason in https://phabricator.services.mozilla.com/D111761#inline-622695.

Attachment #9215644 - Attachment description: WIP: Bug 1704070 - Prevent contextmenu event dispatch in the overscroll gutter on Mac. → Bug 1704070 - Prevent contextmenu event dispatch in the overscroll gutter on Mac. r=tnikkel
Blocks: 1704978
Pushed by bballo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/49eac9a88178 Add a test for contextmenu event dispatch in the overscroll gutter. r=tnikkel https://hg.mozilla.org/integration/autoland/rev/e11655b5fcb8 Expose the APZ event status in the return value of DispatchInputEvent(). r=tnikkel https://hg.mozilla.org/integration/autoland/rev/24f9cd867dd2 Prevent contextmenu event dispatch in the overscroll gutter on Linux. r=tnikkel https://hg.mozilla.org/integration/autoland/rev/1c11e0dd1cdb Prevent contextmenu event dispatch in the overscroll gutter on Mac. r=tnikkel

Verified fixed on the latest version of Nightly 89.0a1 (2021-04-18) (20210418213620) on MacOS 10.14, 10.15 and 11.2.

Status: RESOLVED → VERIFIED
Whiteboard: [mac:ux]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: