Web Share API (navigator.share()) invokes legacy custom share sheet instead of native Android share sheet
Categories
(Firefox for Android :: Share, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox153 | --- | fixed |
People
(Reporter: tech4pwd, Assigned: gl)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
There is an ongoing effort to migrate Firefox for Android from the custom Fenix share sheet to the native Android share sheet. However, when a website triggers a share action via the Web Share API (navigator.share()), Firefox still intercepts this and opens the legacy custom share sheet instead of passing the intent to the native Android OS share sheet.
Steps to reproduce
- Open Firefox Nightly.
- Navigate to the W3C Web Share API demo: https://w3c.github.io/web-share/demos/share.html
- Leave the default text in the fields and tap the Share button.
- Observe the share sheet UI that appears at the bottom of the screen.
Expected behavior
The browser should invoke the native Android share sheet, aligning with the recent design migrations across the rest of the Fenix UI.
Actual behavior
The browser brings up the legacy, custom share sheet.
Device information
- Firefox version: Trunk
- Android device model: Pixel 10 Pro XL
- Android OS version: 16
Any additional information?
Sharing a page directly from the Firefox three-dot menu or address bar correctly invokes the native Android share sheet. The regression/oversight appears specifically tied to how the Web Share API is handled under the hood.
| Reporter | ||
Updated•2 months ago
|
| Assignee | ||
Updated•2 months ago
|
Comment 1•2 months ago
|
||
Just to be clear, are we going to keep the customization to be able to send to other devices, but just with more modern API?
Comment 2•2 months ago
|
||
(I see send to device in (In reply to Paul [pwd] from comment #0)
Sharing a page directly from the Firefox three-dot menu or address bar correctly invokes the native Android share sheet. The regression/oversight appears specifically tied to how the Web Share API is handled under the hood.
I see it's already implemented there, canceling NI. Thanks for the effort here.
| Assignee | ||
Comment 3•2 months ago
|
||
(In reply to Kagami Rosylight [:saschanaz] (they/them) from comment #1)
Just to be clear, are we going to keep the customization to be able to send to other devices, but just with more modern API?
Yes, functionalities such Send to Devices are already handled. The change revolves about using the native Android surface as the share sheet (more modern API when the device can support) and we fallback to the custom share sheet when the API isn't supported on an older device.
| Assignee | ||
Comment 4•2 months ago
|
||
- Shows the native share sheet when web content triggers a share via navigator.share()
- This can be manually tested using the demo test https://mdn.github.io/dom-examples/web-share/ provided in https://developer.mozilla.org/en-US/docs/Web/API/Web_Share_API
Description
•