Closed Bug 1832357 Opened 2 years ago Closed 1 year ago

Nothing happens when clicking on some PDF links in custom tabs

Categories

(Fenix :: App Links, defect)

All
Android
defect

Tracking

(firefox124 verified)

RESOLVED FIXED
124 Branch
Tracking Status
firefox124 --- verified

People

(Reporter: marco, Assigned: royang)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [ux-fun-2024] [fxdroid])

Attachments

(3 files)

Steps to reproduce

Open an app which uses a custom tab and has a link to a PDF, click on that link.
This only happens for specific apps / web sites. I still need to understand what's special about it. The first obvious thing is that it opens a new window with a "blob" URL that is a PDF.

Expected behavior

The PDF should be shown or downloaded.

Actual behavior

When clicking on the link, nothing happens.

Device information

  • Firefox version: 113.
  • Android OS version: 12.

Can you share a an app/website which has this behavior?

Severity: -- → S2
Flags: needinfo?(mcastelluccio)

The app is https://play.google.com/store/apps/details?id=it.copergmps.rt.pf.android.sp.bmps, so probably only usable if you have an account with the bank.

Priority: -- → P3

This issue also can be observed when using discord
with in app browser (custom tabs) enabled and firefox as default browser. Firefox just pops up to new tab and nothing happens.
Also can be confirmed on fresh firefox install.

Do you mean when you open a link to a PDF?

Flags: needinfo?(mcastelluccio) → needinfo?(jai.jap.318)

Yes. But only if opened as custom tab.

Flags: needinfo?(jai.jap.318)

OK, thanks!

I managed to reproduce this with an example page: https://jsfiddle.net/3L98yp4f/. Open this page in a custom tab, click on "ciao", then allow the opening of a popup (in the bank's case this step is missing).

Assignee: nobody → royang
Whiteboard: [fxdroid]
Component: Browser Engine → App Links

The component has been changed since the backlog priority was decided, so we're resetting it.
For more information, please visit BugBot documentation.

Priority: P3 → --
Assignee: royang → nobody
Assignee: nobody → royang

:marco, with latest nightly, this issue should be fixed. Please see my attached video.
Can you please confirm if this issue is fixed for you as well?

Flags: needinfo?(mcastelluccio)

I can still reproduce it. I think you tested opening the page in Firefox itself, you should try opening it in a custom tab.

Flags: needinfo?(mcastelluccio)

(In reply to Marco Castelluccio [:marco] from comment #10)

I can still reproduce it. I think you tested opening the page in Firefox itself, you should try opening it in a custom tab.

Ah, you're right. Only custom tab have this issue. Thanks

Started looking at this again. Looks like the problem here is not that we don't support PDF. But we don't support blob: properly when it's open through a pop up in a custom tab.

Status: NEW → ASSIGNED

Created another link that just opens an url (rather than a PDF) and tested with Chrome to compare behavior.
adb shell am start -a android.intent.action.VIEW -d https://jsfiddle.net/actyp5gr/ -e android.support.customtabs.extra.SESSION true

Comparing to Chrome's behaviour, Chrome opens the new window inside the current custom tab. To match this behaviour, we should just load the URL inside the current custom tab.

This is reason why Chrome works with the PDF use case as well, since it tried to open the blob:// within its custom tab, it resolved it to the PDF file and hence it then trigger a choice for a PDF application.

(In reply to Roger Yang [:royang] from comment #13)

Comparing to Chrome's behaviour, Chrome opens the new window inside the current custom tab. To match this behaviour, we should just load the URL inside the current custom tab.

Have you looked at other window requests to validate we are not breaking any other behaviour? I don't think all web content runs in a way to expect window requests to be loaded in the same tab. target=_blank and all the other special uses by sites like SSO could suddenly break.

Flags: needinfo?(royang)

(In reply to Jonathan Almeida [:jonalmeida] from comment #15)

(In reply to Roger Yang [:royang] from comment #13)

Comparing to Chrome's behaviour, Chrome opens the new window inside the current custom tab. To match this behaviour, we should just load the URL inside the current custom tab.

Have you looked at other window requests to validate we are not breaking any other behaviour? I don't think all web content runs in a way to expect window requests to be loaded in the same tab. target=_blank and all the other special uses by sites like SSO could suddenly break.

I'll make sure to check some of these cases before continuing with the fix.

Flags: needinfo?(royang)
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch
Flags: qe-verify+

Verified as fixed on the latest Nightly 124.0a1 from 08.02.2024 with Google Pixel 7 PRO and OnePlus A3000 (Android 6).

Flags: qe-verify+
Whiteboard: [fxdroid] → [ux-fundamental]
Whiteboard: [ux-fundamental] → [ux-fundamental] [fxdroid]
Whiteboard: [ux-fundamental] [fxdroid] → [ux-fun-2024] [fxdroid]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: