Closed Bug 1809306 Opened 3 years ago Closed 1 year ago

"Copy Link" context menu copies title instead of URL for HTML5 Video

Categories

(Firefox for Android :: Browser Engine, defect, P1)

All
Android
defect

Tracking

()

VERIFIED FIXED
144 Branch
Tracking Status
firefox144 --- verified

People

(Reporter: csadilek, Assigned: avirvara)

References

Details

(Whiteboard: [fxdroid][group1])

Attachments

(1 file)

From github: https://github.com/mozilla-mobile/fenix/issues/18979.

Steps to reproduce

  1. Find an HTML5 video on the Internet. Sample one on this page
    https://www.edcint.co.nz/public/data/firefox/index.shtml
  2. Long press video (context menu appears)
  3. tap "Copy Link"
  4. go to a place/app where you can paste, then paste the link you copied

Expected behavior

the URL of the video is pasted (as experienced in the Windows desktop version of Firefox from the "Copy Video Location" context menu)

Actual behavior

the title attribute of the video is pasted

Device information

v87.0.0-rc.1 Build#2015799099

┆Issue is synchronized with this Jira Task

Change performed by the Move to Bugzilla add-on.

The severity field is not set for this bug.
:cpeterson, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(cpeterson)
Flags: needinfo?(cpeterson)

Ref:
android-components/components/feature/contextmenu/src/main/java/mozilla/components/feature/contextmenu/ContextMenuCandidate.kt

internal fun HitResult.getLink(): String = when (this) {
    is HitResult.UNKNOWN -> src
    is HitResult.IMAGE_SRC -> uri
    is HitResult.IMAGE ->
        if (title.isNullOrBlank()) {
            src.takeOrReplace(MAX_TITLE_LENGTH, "image")
        } else {
            title.toString()
        }
    is HitResult.VIDEO ->
        if (title.isNullOrBlank()) src else title.toString()
    is HitResult.AUDIO ->
        if (title.isNullOrBlank()) src else title.toString()
    else -> "about:blank"
}

Currently , so if is VIDEO and title is not null , use title.
We should divide this to "Copy Link" and "Copy Link Text".

See Also: → 1809303
Severity: -- → S3
Component: General → Browser Engine

Jeff says this would be easy to fix. We only want to copy the link URL, not the link text.

Priority: -- → P2

Clearing Priority so we can reprioritize these bugs relative to our ux-fun-2024 bugs.

Priority: P2 → --
Priority: -- → P1
Whiteboard: [fxdroid][group1]
Duplicate of this bug: 1901206

Redirect a needinfo that is pending on an inactive user to the triage owner.
:boek, since the bug has high priority and recent activity, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(gurullytech) → needinfo?(jboek)
Flags: needinfo?(jboek)
Assignee: nobody → avirvara
Attachment #9510795 - Attachment description: WIP: Bug 1809306: copy link context menu should copy the url, not the title of the video → Bug 1809306: copy link context menu should copy the url, not the title of the video
Pushed by avirvara@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/dcf1a6e71ada https://hg.mozilla.org/integration/autoland/rev/2c63cd0c9256 copy link context menu should copy the url, not the title of the video r=android-reviewers,matt-tighe
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 144 Branch
Flags: qe-verify+

Verified as fixed on the latest Firefox for Android Nightly 144.0a1 from 9/13 with a Samsung Galaxy S24 (Android 15), and an OnePlus 5T (Android 10).

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: