Closed Bug 784222 Opened 10 years ago Closed 6 years ago
Long pressing on content in the Apps and Addons pages cause text selection and context menus to be displayed
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.
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.
(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".
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.
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
Updating commit message to reflect r=margaret.
You need to log in before you can comment on or make changes to this bug.