Closed Bug 784222 Opened 12 years ago Closed 9 years ago

Long pressing on content in the Apps and Addons pages cause text selection and context menus to be displayed

Categories

(Firefox for Android Graveyard :: Add-on Manager, defect)

ARM
Android
defect
Not set
normal

Tracking

(firefox14 affected, firefox15 affected, firefox16 affected, firefox17 affected, firefox44 fixed)

RESOLVED FIXED
Firefox 44
Tracking Status
firefox14 --- affected
firefox15 --- affected
firefox16 --- affected
firefox17 --- affected
firefox44 --- fixed

People

(Reporter: mcomella, Assigned: miketaylr)

References

Details

Attachments

(1 file, 1 obsolete file)

1) Open Firefox
2) Click the overflow options menu.
3) Select "Add-ons"
4) Long press the marketplace icon

Expected: Nothing happens
Actual: A context menu pops up requesting to share or save image

Text selection occurs if you long press the title, "Your Add-ons".

Same thing occurs in the web apps page.
These pages are written in xhtml (ex: https://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/aboutApps.xhtml) so I think they would have to be special-cased to remove these extra interactions.
We support pages disabling context menus. Listen for "contextmenu" events on the document and call aEvent.preventDefault().
Oh wait, that won't kill text selection will it... maybe it should.
We should also test things like user-select during selection:

https://developer.mozilla.org/en-US/docs/CSS/user-select
Using -moz-user-select: none; addresses this issue, but I'm not sure if it's actually a problem that we allow text selection in about:addons/about:apps/about:downloads.

Robin, do you have an opinion here? It would be an easy patch to write.
Flags: needinfo?(randersen)
Blocks: 1079475
Well, if we get 1058243 to work then that icon won't show up anymore since it takes you to AMO instead of "Your Add-ons", anyway. 

If it persists, then it should not have long-press function, especially when long-pressing is trying to copy the icon and the text in the next cell (for me, the title of the first Add-on I have installed). We should probably disable long-press for that entire cell.
Flags: needinfo?(randersen)
(In reply to Robin Andersen [:tecgirl] from comment #6)
> Well, if we get 1058243 to work then that icon won't show up anymore since
> it takes you to AMO instead of "Your Add-ons", anyway. 
> 
> If it persists, then it should not have long-press function, especially when
> long-pressing is trying to copy the icon and the text in the next cell (for
> me, the title of the first Add-on I have installed). We should probably
> disable long-press for that entire cell.

I interpret this bug as a more general issue of whether or not to enable text selection on the entire about: pages. Disabling text selection would make it feel a bit more "native", and that's actually what desktop does in their about:addons, so maybe we should go ahead with that.

Long press will still bring up context menus on the individual add-ons, but that's more expected, because the options there are things like "Disable" and "Uninstall".
Blocks: 1053397
Blocks: about-improvements
No longer blocks: 1053397
I think we should disable text selection to be consistent with what Desktop does. If we do this in aboutBase.css, these are the affected pages:

aboutAccounts
aboutAddons, desktop can’t do selection
aboutDevices, need to be careful to not disable selection of the IP input.
aboutDownloads, desktop can’t do selection
aboutLogins, selection doesn't make much sense because clicking brings up a context menu with all the useful stuff IMO.
Assignee: nobody → miket
Margaret, do you mind reviewing?
Attachment #8666595 - Flags: review?(margaret.leibovic)
This issue also came up in bug 1177520, so I want to make sure Barbara is aware of this.

However, I agree with the assessment in comment 8, let's be consistent with desktop.
Flags: needinfo?(bbermes)
Comment on attachment 8666595 [details] [diff] [review]
784222.-Make-non-input-text-unselectable-for-abo.patch

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

Looks good to me, thanks for being thorough about checking where this file is used.
Attachment #8666595 - Flags: review?(margaret.leibovic) → review+
Thanks! I had some selection robocop tests go orange, but they're green after retriggering.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=8b78a0c6f2db
Keywords: checkin-needed
Updating commit message to reflect r=margaret.
Attachment #8666595 - Attachment is obsolete: true
Attachment #8667119 - Flags: review+
https://hg.mozilla.org/integration/fx-team/rev/ce5a761f544f
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/ce5a761f544f
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 44
Flags: needinfo?(bbermes)
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: