Closed Bug 1424252 Opened 2 years ago Closed 2 years ago

No text selection on pages with HTML context menus

Categories

(Firefox for Android :: Text Selection, defect)

Firefox 56
All
Android
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- verified

People

(Reporter: pftbest, Assigned: esawin)

References

Details

(Whiteboard: [specification][type:bug])

Attachments

(1 file, 2 obsolete files)

What did you do?
================
1. Open Firefox for Android version 56

2. visit https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox

3. Try to select some text to copy

What happened?
==============
Popup appers with options to edit the text or view page history

What should have happened?
==========================
It should be possible to select some text and copy it.

Is there anything else we should know?
======================================
I had to use Google Chrome just to copy one line of text from this website, this is ridiculous.
developer.mozilla.org is using a contextmenu on the <body>. The <menu> edit-history-menu has two items, "Edit page" and "View page history". On Desktop Firefox, this adds these items to the "right-click" menu, but allows other default items such as "View Page Source" to still be available. It appears the on Firefox for Android, it may replace the context menu instead.

The contextmenu attribute is not supported in Chrome or other browsers:

https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contextmenu#Browser_compatibility
OS: Other → Android
Product: Mozilla Developer Network → Firefox for Android
Hardware: All → Unspecified
Version: unspecified → Firefox 56
I was able to reproduce with Nexus 5 (Android 6.0.1) on latest nightly build. Marking the bug as New.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Hi snorp
Could someone in your team help look at this?
Thanks!
Component: General → Text Selection
Flags: needinfo?(snorp)
There's work in Gecko to remove the <menu> functionality. We could preemptively stop supporting it in Fennec/GV. Eugen, you've looked at this before, wanna nuke it?
Flags: needinfo?(snorp) → needinfo?(esawin)
Remove HTML contextmenu support in Fennec.

We don't support <menu> in GV afaik, so there is nothing to do there.
Assignee: nobody → esawin
Flags: needinfo?(esawin)
Attachment #8940829 - Flags: review?(snorp)
Attachment #8940829 - Flags: review?(snorp) → review?(cnevinchen)
Comment on attachment 8940829 [details] [diff] [review]
0001-Bug-1424252-1.0-Remove-menu-support-in-Fennec.-r-sno.patch

Thanks!
Attachment #8940829 - Flags: review?(cnevinchen) → review+
Updated r=nechen.
Attachment #8940829 - Attachment is obsolete: true
Attachment #8941523 - Flags: review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/df5c47596915
Remove <menu> support in Fennec. r=nechen
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/df5c47596915
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
Summary: It's not possible to select and copy text using mobile Firefox → Remove obsolete html5 attribute contextmenu from Fennec
Depends on: 1429757
Hardware: Unspecified → All
As noted in bug 1429757, this breaks the context menus for about:downloads, about:addons and about:config [1].

[1] https://dxr.mozilla.org/mozilla-central/search?q=path%3Amobile+%3Cmenu+-path%3Asrc%2Fmain%2Fres+-path%3A.java&redirect=false
Blocks: 1389829
Depends on: 1431512
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Backed out changeset df5c47596915 (bug 1424252) for causing bug 1429757
https://hg.mozilla.org/mozilla-central/rev/d4d53f4069f4
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: Firefox 59 → ---
Since we can't immediately remove <menu> support, we need to mitigate the issue described in comment 0.

This is a somewhat ugly solution we could apply during the transition (until bug 1431512 is fixed).
The patch would allow for both, the HTML context menu and the text selection dialogs to pop up for text and other non-link elements, which would at least make text selection an option after discarding the HTML context menu.
Flags: needinfo?(esawin)
Attachment #8943968 - Flags: review?(cnevinchen)
Summary: Remove obsolete html5 attribute contextmenu from Fennec → No text selection on pages with HTML context menus
I've moved out the removal of <menu> support to bug 1431759.
Attachment #8941523 - Attachment is obsolete: true
Duplicate of this bug: 1251854
No longer depends on: 1431512
Keywords: dev-doc-needed
Attachment #8943968 - Flags: review?(cnevinchen) → review+
Pushed by esawin@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/cb9d29d5f5bd
[2.0] Enable text selection complementary to the HTML or native context menu. r=nechen
https://hg.mozilla.org/mozilla-central/rev/cb9d29d5f5bd
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Tested with Nexus 5 (Android 6.0.1) and Google Pixel (Android 8.0) following the steps from description and the issue is fixed on latest Nightly build. Fixed meaning that the both menus are displayed when selecting a word. 
On Nexus 5 the HTML context menu is displayed only once, but on Pixel every time a word is selected. Tested also text selection dialog and I was able to copy/share/select/search. Marking status 60:verified.
See Also: → 1462226
Duplicate of this bug: 1462226
You need to log in before you can comment on or make changes to this bug.