Closed Bug 598363 Opened 9 years ago Closed 9 years ago

Context menu cannot be dismissed after opening a link in a new tab.

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
All
defect
Not set

Tracking

(fennec2.0b3+)

VERIFIED FIXED
Tracking Status
fennec 2.0b3+ ---

People

(Reporter: nhirata, Assigned: mbrubeck)

Details

(Whiteboard: [fennec-checkin-postb2])

Attachments

(2 files)

Mozilla/5.0 (Maemo;Linux armv71; rv:2.0b7pre)Gecko/20100921 Firefox/4.0b7pre Fennec/2.0b1pre

Mozilla/5.0 (Android; Linux armv71; rv2.0b7pre) Gecko/20100921 Firefox/4.0b7pre Fennec/2.0b1pre

1. go to url: http://people.mozilla.com/~nhirata/
2. long tap on html_tp link
3. select : open in a new tab in the context menu
4. long tap on html_tp link again
5. click outside the context menu

Expected:
Context menu dismisses

Actual:
context menu does not dismiss.
OS: Mac OS X → All
Hardware: x86 → ARM
tracking-fennec: --- → ?
Flags: in-litmus?(nhirata.bugzilla)
It looks like this has to do with either memory or a page loading at the same time.  It's harder to reproduce now, you need to do step 1 ~ 3 multiple times to have around 8 tabs or so to get this issue to occur.  It still does occur on both.

May need to take a relook after bug 598331 lands.
litmus test case created : 
https://litmus.mozilla.org/show_test.cgi?searchType=by_id&id=13540
Flags: in-litmus?(nhirata.bugzilla) → in-litmus+
Assignee: nobody → mbrubeck
Matt - can you repo this?
in order to reproduce this, I need to have the tab bar hidden and open the context menu while the "New tab opened" alert is visible
tracking-fennec: ? → 2.0+
tracking-fennec: 2.0+ → 2.0b3+
Status: NEW → ASSIGNED
Attached patch patchSplinter Review
ContextHelper.hide() is called twice: Once when NewTabPopup.show calls BrowserUI.pushPopup, and once by the context-commands onclick handler.  The second time it's called, its popPopup pops the wrong popup.

This patch fixes this in two ways.  First, it fixes ContextHelper.hide() so it doesn't do anything if the menu is already hidden.

That's enough to fix this bug, but this could easily happen again if some other code calls popPopup() while its popup is no longer pushed.  To prevent this, I also added an argument to popPopup() so it can check that the right popup is popped.
Attachment #487076 - Flags: review?(mark.finkle)
Comment on attachment 487076 [details] [diff] [review]
patch

Nice
Attachment #487076 - Flags: review?(mark.finkle) → review+
Whiteboard: [fennec-checkin-postb2]
http://hg.mozilla.org/mobile-browser/rev/df1c79eb047e
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Attached patch followupSplinter Review
A bug in the patch is causing an uncaught exception when showing a notification on desktop/Maemo.
Attachment #487468 - Flags: review?(mark.finkle)
Attachment #487468 - Flags: review?(mark.finkle) → review+
Whiteboard: [fennec-checkin-postb2]
verified fixed on:
Mozilla/5.0(Android; Linux armv7l;rv2.0b8pre) Gecko/20101102 Firefox/4.0b8pre
Fennec/4.0b3pre

And

Mozilla/5.0(Maemo; Linux armv7l;rv2.0b8pre) Gecko/20101102 Firefox/4.0b8pre
Fennec/4.0b3pre
Status: RESOLVED → VERIFIED
Whiteboard: [fennec-checkin-postb2]
You need to log in before you can comment on or make changes to this bug.