Closed Bug 1017008 Opened 10 years ago Closed 6 years ago

Context menus do not close after tapping outside the menu

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(firefox30 affected, firefox31 affected, firefox32 affected, firefox33 affected, firefox34 affected, firefox35 affected, firefox36 affected, firefox37 affected, firefox38 affected)

RESOLVED WORKSFORME
Tracking Status
firefox30 --- affected
firefox31 --- affected
firefox32 --- affected
firefox33 --- affected
firefox34 --- affected
firefox35 --- affected
firefox36 --- affected
firefox37 --- affected
firefox38 --- affected

People

(Reporter: elbart, Unassigned)

Details

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

STR:
- Go to any website.
- Long tap on any link.
- Tap outside the context menu to try to dismiss the context menu.

AR:
Context menu stays. (even when pressing the Home-button and going back to the browser, which might be worth another bugticket).

ER:
Context menu goes away and closes without doing anything.


SGS2 i9100 4.1.2
Firefox 29 and Nightly

Stock Android browser and Chrome Mobile both close the context menu when tapping outside of it.
This works for me fine on my Nexus 7/Nexus 5/HTC One and Galaxy S5.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Have you only tested the global menu or the actual context menu? I'd be amazed if this bug was device-specific:

http://elbart.bplaced.net/bugzilla/1017008_screenrecording_i9100_nightly.mp4
(In reply to Elbart from comment #2)
> Have you only tested the global menu or the actual context menu? I'd be
> amazed if this bug was device-specific:
> 
> http://elbart.bplaced.net/bugzilla/1017008_screenrecording_i9100_nightly.mp4

Context-menu. E.g, from my Nexus 7 (2013, 4.4.2) 

https://www.youtube.com/watch?v=2OaDNjhxEhE

> I'd be amazed if this bug was device-specific

Maybe a stupid Android bug on older Jellybean
(In reply to Aaron Train [:aaronmt] from comment #3)
> (In reply to Elbart from comment #2)
> > Have you only tested the global menu or the actual context menu? I'd be
> > amazed if this bug was device-specific:
> > 
> > http://elbart.bplaced.net/bugzilla/1017008_screenrecording_i9100_nightly.mp4
> 
> Context-menu. E.g, from my Nexus 7 (2013, 4.4.2) 
> 
> https://www.youtube.com/watch?v=2OaDNjhxEhE

And what about devices which aren't brand-new high-end with huge screens?
Just note the difference in the nav-bar, maybe the different layout is part the problem.

> > I'd be amazed if this bug was device-specific
> 
> Maybe a stupid Android bug on older Jellybean

Another bug which only affects Firefox?
Oh, and more weirdness:

Long-tapping on any entry under "History", "Top Sites" and "Bookmarks" followed by tapping outside the context-menu:
WORKING

Long-tapping on any download in "Downloads" or add-on in "Add-ons":
NOT WORKING

Very selective bug.
Changing status based on observations in comment 5.
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
(In reply to Elbart from comment #5)

> Long-tapping on any entry under "History", "Top Sites" and "Bookmarks"
> followed by tapping outside the context-menu:
> WORKING
> 
> Long-tapping on any download in "Downloads" or add-on in "Add-ons":
> NOT WORKING
> 

All these steps work ok for me on an Alcatel One Touch (Android 4.1.2) on latest Nightly and Aurora 2014-06-15, 31 Beta 1 and Release (Firefox 30).
I am able to reproduce this issue using Samsung S3 (Android 4.3) with the steps from both comments (comment 0 and comment 5).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reproducible on Samsung Galaxy Tab (Android 4.0) on Firefox for Android 31 Beta 4 when trying to dismiss the context menu  after long tapping a link.
Lucas, would you like to mentor?
Flags: needinfo?(lucasr.at.mozilla)
(In reply to Michael Comella (:mcomella) from comment #10)
> Lucas, would you like to mentor?

I think wesj would be a more appropriate mentor here.
Flags: needinfo?(lucasr.at.mozilla) → needinfo?(wjohnston)
This isn't a good mentor bug. I have no idea why Android's normal dialog's are failing here. We don't do anything special. If someone wants to grab it, feel free, but you'll have to do some experiments and investigation. I can help explain any of our prompt code if you want. We use pretty typical Android AlertDialog.Builder code:

http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/prompts/Prompt.java#167
Flags: needinfo?(wjohnston)
Maybe the following helps?

(In reply to Elbart from comment #5)
> Long-tapping on any entry under "History", "Top Sites" and "Bookmarks"
> followed by tapping outside the context-menu:
> WORKING

Non-XUL content.

> Long-tapping on any download in "Downloads" or add-on in "Add-ons":
> NOT WORKING

XUL content. Maybe the LayerView steals the click events?
Reproducible on Samsung Galaxy S4 (Android 4.4.2).
via MenuPopup [1], which apparently had similar problems:

  // Setting a null background makes the popup to not close on touching outside.
  setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));

Maybe that's all that needs to be done here.

[1]: https://mxr.mozilla.org/mozilla-central/source/mobile/android/base/menu/MenuPopup.java?rev=182716b666bf#38
I tried to reproduce this issue in the latest version of Nightly 65.0a1 (2018-10-26) and Release (63.0) but I wasn't able.
Device: Prestigio Grace X5 (Android 4.4.2), LG G4 (Android 5.1) and OnePlus 5T (Android 8.1.0).
I'll close this issue as WFM due to the large period from the affected version and the actual version. If the issue its reappear please reopen the issue, thanks.
Status: NEW → RESOLVED
Closed: 10 years ago6 years ago
Resolution: --- → WORKSFORME
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.