Closed Bug 922934 Opened 11 years ago Closed 11 years ago

Defect - Context menu's from links not clearing when scrolling

Categories

(Firefox for Metro Graveyard :: Pan and Zoom, defect, P2)

All
Windows 8.1
defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 27

People

(Reporter: kjozwiak, Assigned: mbrubeck)

References

Details

(Keywords: regression, Whiteboard: feature=defect c=context_menus u=metro_firefox_user p=1)

Attachments

(3 files, 1 obsolete file)

When a user receives a context menu by tapping & holding on a link, scrolling through the website will not clear the context menu

- Attached a screenshot to illustrate the issue (opened that context menu at the top of the Wiki then scrolled near the bottom of the page)

Steps to reproduce the issue:

1) Open Firefox Metro
2) Go to wikipedia.org
3) Tap & hold on a link and let go (you should receive the context menu)
4) Scroll through the website by swiping down and you'll notice that the context menu is not being cleared

Current Behavior:

- Context menu from tapping & holding on link will not dismiss when scrolling through the website

Expected Behavior:

- Context menu should be cleared when the user scrolls through the website

Used the following build:
http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2013-10-01-03-02-04-mozilla-central/
Whiteboard: feature=defect c=context_menus u=metro_firefox_user p=0 → [triage] feature=defect c=context_menus u=metro_firefox_user p=0
This is a regression from enabling async scrolling.  The context menu code listens for a "PanBegin" event which was sent by our old JavaScript panning code, but this is not sent when using AsyncPanZoomController:
http://mxr.mozilla.org/mozilla-central/source/browser/metro/base/content/helperui/MenuUI.js#520

We can fix this by listening for the apzc-handle-pan-begin notification instead.
Assignee: nobody → mbrubeck
Component: Browser → Pan and Zoom
Keywords: regression
Whiteboard: [triage] feature=defect c=context_menus u=metro_firefox_user p=0 → [preview] feature=defect c=context_menus u=metro_firefox_user p=1
Flags: in-testsuite?
Blocks: metrov1it16
No longer blocks: metrov1backlog
Status: NEW → ASSIGNED
Priority: -- → P2
QA Contact: jbecerra
Whiteboard: [preview] feature=defect c=context_menus u=metro_firefox_user p=1 → feature=defect c=context_menus u=metro_firefox_user p=1
Attached patch patch (obsolete) — Splinter Review
Even better, we can just use standard events (mousedown, touchstart, scroll) to dismiss the context menu.  The advantage is that these work in cases like pinch zooming, double-tap zooming, mousewheel scroll, etc. where PanBegin and handle-apzc-pan-begin do not.
Attachment #813158 - Flags: review?(msamuel)
Attached patch testSplinter Review
Attachment #813168 - Flags: review?(msamuel)
Attached patch patch v2Splinter Review
I noticed a bug in the previous patch: We need to check the target of the "scroll" event too, in case we are scrolling the menu itself (e.g. for a very long <select> menu).
Attachment #813158 - Attachment is obsolete: true
Attachment #813158 - Flags: review?(msamuel)
Attachment #813179 - Flags: review?(msamuel)
Comment on attachment 813179 [details] [diff] [review]
patch v2

Review of attachment 813179 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good! Work well.
Attachment #813179 - Flags: review?(msamuel) → review+
Attachment #813168 - Flags: review?(msamuel) → review+
https://hg.mozilla.org/integration/fx-team/rev/ca56f76237df
Flags: in-testsuite? → in-testsuite+
Hardware: x86_64 → All
Backed out because of test failures:
https://hg.mozilla.org/integration/fx-team/rev/8f1cdf02deb8
https://hg.mozilla.org/mozilla-central/rev/ca56f76237df
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 27
Went through the following "Defect" for iteration #16 without issues. Used the following build:
http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2013-10-16-03-02-02-mozilla-central/

- Went through the original test cases from comment #0 without any issues
- Ensured scrolling will dismiss the context menu (scrolling up & down)
- Ensured that tapping on the screen will dismiss the context menu
- Ensured that the context menu is being dismissed when sliding the Navigation App Bar from the bottom
- Ensured that the context menu is being dismissed when sliding the Tab App Bar from the top
- Ensured that the context menu is being dismissed when tapping the junior style "Back" button
- Ensured that the context menu is being dismissed when tapping on the junior style "+" button
- Ensured that both link & image context menu's are being cleared
- Ensured that all of the above test cases worked in both filled and full views without issues
OS: Windows 8 Metro → Windows 8.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: