OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
669 stars 95 forks source link

Font family changed when using SetSignatureAsync on Mac #3976

Open bogdanst24 opened 8 months ago

bogdanst24 commented 8 months ago

Your Environment

Expected behavior

The font-family specified in the HTML is maintained and applied as expected.

Current behavior

For some users (we could not identify exactly a pattern), the font family is changed. We managed to reproduce it when the font family is set to Century Gothic, a case in which Hyperlinks are getting the font changed to Calibri. Regardless of any workarounds, styling properties, or other ways to set the font family, the issue won't go away.

Steps to reproduce

Providing you with 2 ways to reproduce. In both cases, Outlook for Mac should be used. Option A

  1. Use the Script Lab for Outlook tool provided by Microsoft (https://appsource.microsoft.com/en-us/product/office/wa200001603?tab=overview)
  2. Load the "Work with client signatures (Compose)" sample script
  3. Use the following HTML snippet as the Signature Text:
    <p class="default" style="font-family:'Century Gothic'; color: red; font-size: 10px; margin:0">Paragraph with custom style</p><span class="default" style="font-family:'Century Gothic'; color: red; font-size: 10px">Span with custom style</span><br><a class="default" style="font-family:'Century Gothic'; color: red; font-size: 10px; text-decoration:none" href="https://google.com/">Hyperlink with custom style</a><br><div class="default" style="font-family:'Century Gothic'; color: red; font-size: 10px">Div with custom style</div><a class="default" style="font-family:'Century Gothic'; color: red; font-size: 10px; text-decoration:none" href="https://google.com/"><span class="default" style="text-decoration:none; font-family:'Century Gothic'; color: red; font-size: 10px">Span in Hyperlink with custom style</span></a><br><span class="default" style="font-family:'Century Gothic'; color: red; font-size: 10px; text-decoration:none"><a class="default" style="font-family:'Century Gothic'; color: red; font-size: 10px; text-decoration:none" href="https://google.com/">Hyperlink in span with custom style</a></span>
  4. Click the "setSignature with inline image" so that HTML is inserted

Result => It will change (at least) the hyperlinks from Century Gothic to Calibri.

Option 2:

  1. Use this Gist to reproduce https://gist.github.com/bogdanst24/e707e61bb2d04dda091a9e3c9b1ec065
  2. Press Set custom signature button
  3. Check all lines in the inserted signature for font.

Result => It will change (at least) the hyperlinks from Century Gothic to Calibri.

Link to live example(s)

Gist https://gist.github.com/bogdanst24/e707e61bb2d04dda091a9e3c9b1ec065

exextoc commented 8 months ago

@bogdanst24 We could not repro this using Script lab with the provided signature. In our case all the lines were having correct font. Could you please record and share a vid of the repro. You mentioned that its only happening for few users, could you share the version of Outlook client where this problem is seen.

bogdanst24 commented 8 months ago

Sure, could you please help me with a mail address to send it to?

exextoc commented 8 months ago

@bogdanst24 Share it on OutlookExtensibility@M365x53858506.onmicrosoft.com

bogdanst24 commented 7 months ago

I have shared a recording on January 16th

exextoc commented 7 months ago

We are not able to repro the issue at our end. Can we get the Outlook Version and the Incident Id after the repro so that we can get all the details.

Steps to get Incident ID: Go to Help-> Collect Diagnostics-> Share the generated Incident ID

bogdanst24 commented 7 months ago

This is the message from the affected user:

My Mac upgraded itself to Sonoma 14.2.1 this weekend, but the issue persists with a different font. Outlook is changing links to “Aptos” now.

image

bogdanst24 commented 7 months ago

Incident ID: 747EPKMW

bogdanst24 commented 6 months ago

Any updates here?

DivyaPatidar commented 6 months ago

@bogdanst24 We are unable to replicate the issue on our end. However, we have identified a similar bug and believe that the fix for that may also resolve this issue. We will update here once fix for other issue is rolled out.

bogdanst24 commented 6 months ago

Thank you! Waiting then :)