Closed Bug 741436 Opened 12 years ago Closed 12 years ago

Long Press Menu on a Web App on about:apps needs to be consistently the same

Categories

(Firefox for Android Graveyard :: Web Apps (PWAs), defect)

ARM
Android
defect
Not set
normal

Tracking

(firefox14 verified, blocking-fennec1.0 soft)

VERIFIED FIXED
Firefox 14
Tracking Status
firefox14 --- verified
blocking-fennec1.0 --- soft

People

(Reporter: jsmith, Assigned: mfinkle)

References

Details

(Whiteboard: [marketplace-beta?])

Attachments

(3 files)

Upon long pressing an installed open web app on about:apps, the context menu that appears should be the same for every app installed. The context menu is the following:

App Name
Save Image
Add to Home Screen
Uninstall

However, I've seen the following three cases occur while using about:apps with apps installed:

Case 1 (see screenshot Missing Context Menu Items Web App)

Add to Home Screen
Uninstall

Case 2 (see screenshot Too Many Context Menu Items Web App)

App Name
Save Image
Add to Home Screen
Uninstall
Add to Home Screen
Uninstall

Case 3

App Name
Add to Home Screen
Uninstall

Case 1 for example non-deterministically I've seen occur with steps similar to the following:

	1. Install the latest fennec native nightly
	2. Go to apps.mozillalabs.com/appdir
	3. Select an app to install and hit ok
	4. Go to about:apps
	5. Long press the app you installed
	6. Select "Add to Home Screen"
	7. Remove the app shortcut from the home screen
	8. Install another app from apps.mozillalabs.com/appdir
	9. Go to about:apps
	10. Long press each app installed - one app may have case 1 occur

From exploratory testing each of the cases, it looks like this is happening post adding shortcuts to the homescreen, particularly doing it with multiple apps. Mark - Any ideas?

Device: Samsung Galaxy Nexus
OS: Android 4.02
Build: Fennec Native Nightly
Whiteboard: [webapp]
Whiteboard: [webapp] → [WebRT]
Case #1 should be the only items in the context menu:
* Add to Home Screen
* Uninstall
Component: General → Web Apps
Whiteboard: [WebRT]
Blocks: 738546
QA Contact: general → web-apps
No longer blocks: 738546
Whiteboard: [marketplace-beta?]
Attached patch patchSplinter Review
This patch just turns off pointer-events to the inner elements (img and title) allowing the menu to only fire for the outer div. The menu has the app title, uninstall and add to homescreen.
Assignee: nobody → mark.finkle
Attachment #614791 - Flags: review?(wjohnston)
blocking-fennec1.0: --- → soft
low-risk polish
Comment on attachment 614791 [details] [diff] [review]
patch

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

Heh. I had to dig to find out why this works. cwu.elementFromPoint uses the same hit testing code that we use when targeting mouse events (the same code that I hate every day right now), which checks the pointer-events css in order to find the hit target. So document.elementFromPoint gets to inherit this nice behavior. The spec says "The element to be returned is determined through hit testing" and

"The specifics of hit testing are out of scope of this specification and therefore the exact details of elementFromPoint() and caretPositionFromPoint() are therefore too. Hit testing will hopefully be defined in a future revision of CSS or HTML."
Attachment #614791 - Flags: review?(wjohnston) → review+
Whoops. Meant to ask, can you carry over this behavior to the download manager. Either just do it here, or file a bug for it? We should be seeing this bug there as well...
(In reply to Wesley Johnston (:wesj) from comment #8)
> Whoops. Meant to ask, can you carry over this behavior to the download
> manager. Either just do it here, or file a bug for it? We should be seeing
> this bug there as well...

I'll file a new bug

https://hg.mozilla.org/integration/mozilla-inbound/rev/7b71bbd94961
https://hg.mozilla.org/mozilla-central/rev/7b71bbd94961
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 14
Verified on Nightly build.
Status: RESOLVED → VERIFIED
(In reply to Jason Smith from comment #11)
> Verified on Nightly build.

Samsung Galaxy Nexus (Android 4.0.4)
04/16 (Mozilla/5.0 (Android; Mobile; rv:14.0) Gecko/14.0 Firefox/14.0a1)
Requesting to reopen. This bug consistently happens when I installed one particular application that did not have an icon. It will show the following:

Mozilla QA WebRT Tester
Add to Home Screen
Uninstall
Add to Home Screen
Uninstall
Flags: in-moztrap?
Flags: in-moztrap? → in-moztrap?(aaron.train)
Did you file a new bug about that Jason, comment #13?
Anyways, MozTrap: http://moztrap.allizom.org/manage/cases/_detail/571/
Flags: in-moztrap?(aaron.train) → in-moztrap+
(In reply to Jason Smith [:jsmith] from comment #13)
> Requesting to reopen. This bug consistently happens when I installed one
> particular application that did not have an icon. It will show the following:
> 
> Mozilla QA WebRT Tester
> Add to Home Screen
> Uninstall
> Add to Home Screen
> Uninstall

File a new bug for this issue
(In reply to Mark Finkle (:mfinkle) from comment #16)
> (In reply to Jason Smith [:jsmith] from comment #13)
> > Requesting to reopen. This bug consistently happens when I installed one
> > particular application that did not have an icon. It will show the following:
> > 
> > Mozilla QA WebRT Tester
> > Add to Home Screen
> > Uninstall
> > Add to Home Screen
> > Uninstall
> 
> File a new bug for this issue

Strange. I can't get a reproduction of this issue on Fennec Native Nightly anymore. I wonder what fixed the issue. I'll open a bug if I see the issue again.
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: