Closed Bug 1731825 Opened 3 years ago Closed 3 years ago

Add an intervention to auto-hide mailto handler prompts on Office365

Categories

(Web Compatibility :: Interventions, defect)

defect

Tracking

(firefox93 verified, firefox94 verified)

VERIFIED FIXED
Tracking Status
firefox93 --- verified
firefox94 --- verified

People

(Reporter: twisniewski, Assigned: twisniewski)

References

Details

Attachments

(1 file)

As discussed in bug 1709653, Office365 currently queries the user on whether it ought to handle email in Firefox on every navigation, regardless of whether the user has already dismissed the prompt. After some discussion, we would like to add a site intervention so that prompt only shows once, until we properly resolve bug 668577.

This should be possible by adding a JS intervention which wraps around navigator.registerProtocolHandler. It will check if a cookie (of our own devising) named something like mailProtocolHandlerAlreadyOffered has been set. If it has, the call will be ignored. If it has not, the cookie will be set, and the call to registerProtocolHandler will be permitted.

This should give users a relatively easy way to see the prompt again, while keeping the intervention as simple as possible.

Blocks: 1709653
Assignee: nobody → twisniewski
Status: NEW → ASSIGNED

My test accounts for Office aren't working, but the patch appears to work for Ksenia at least. I'm making some builds for others to test this at https://treeherder.mozilla.org/jobs?repo=try&revision=9848751c237ffb9e6a0f29497de32f7eb866829e

:daibodea, I see that you were able to reproduce the issue in bug 1709653, would you mind using one of the builds in the previous comment to verify if the fix here works? The email-handler prompt should only appear once on a given Office 365 domain, and then you will see a message in the devtools web console that it has been blocked on subsequent page-loads on that same domain.

Flags: needinfo?(daniel.bodea)
Pushed by twisniewski@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7f3bb2349a70
Hide the Office365 Outlook registerProtocolHandler notification after it shows once, as a work-around until bug 668577 is fixed; r=ksenia,webcompat-reviewers

Comment on attachment 9242510 [details]
Bug 1731825 - Hide the Office365 Outlook registerProtocolHandler notification after it shows once, as a work-around until bug 668577 is fixed; r?ksenia

Beta/Release Uplift Approval Request

  • User impact if declined: Office 365 apps will continue to frustrate users with notifications on each page-load to allow Outlook 365 to handle emails in Firefox.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: 1. Log in to an Office 365 app hosted on an office.com, live.com, or sharepoint.com site.
  1. Confirm that the notification to allow Outlook to handle emails in Firefox is shown to the user.
  2. Reload the page, and confirm that the notification no longer appears.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This change is limited to the webcompat system addon and makes no core Firefox changes. It also only affects Office 365 apps, and only in a way which is very unlikely to influence anything except registerProtocolHandler notifications.
  • String changes made/needed:
Attachment #9242510 - Flags: approval-mozilla-beta?

Comment on attachment 9242510 [details]
Bug 1731825 - Hide the Office365 Outlook registerProtocolHandler notification after it shows once, as a work-around until bug 668577 is fixed; r?ksenia

Approved for our last beta, thanks.

Attachment #9242510 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

Reproduced the initial issue from comment 0, the notification is shown each time I refresh the page using old Nightly build from 2021-08-19. Verified that using Firefox 93.0b9 and latest Nightly 94.0a1 across platforms (Windows 10, Ubuntu 18.04 and MacOS 11.5), the notification will only appear once per session, it does appear after restart.

Status: RESOLVED → VERIFIED
Flags: needinfo?(daniel.bodea)
See Also: → 1751226
See Also: → 668577
See Also: → 1840426
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: