Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outlook signature changes appearance after clicking on "Open in new window" #5285

Closed
ivanosevitch opened this issue Jan 17, 2025 · 2 comments
Assignees
Labels
Area: Outlook Issue related to Outlook add-ins Resolution: has workaround Problem can be avoided by implementing workaround

Comments

@ivanosevitch
Copy link

ivanosevitch commented Jan 17, 2025

After inserting a signature, clicking on "open in new window" will make some table rows in the signature higher than what they actually are. The signature will thus not look the same.

Your Environment

  • Platform [PC desktop, Mac, iOS, Office on the web]: PC Desktop
  • Host [Excel, Word, PowerPoint, etc.]: New Outlook Desktop and web
  • Office version number:
    Image
  • Operating System: Windows 11
  • Browser (if using Office on the web): Edge

Expected behavior

Signature is rendered in the same fashion than before clicking on "open in new window", that is like this:
Image

Current behavior

Outlook adds a inline style of height: 47px; to the first td element (containing "Hello Hello Hello") after the email is opened in a new window. This height is both unneeded and too high. This leads to the signature looking differently than the "expected behavior", with a space too big between the first row ("Hello") and the second row (Microsoft link):
Image

Steps to reproduce

const sig = `<table>
    <tbody>
        <tr>
            <td style="width: 448px;">
                <p><span>Hello Hello Hello</span></p>
            </td>
        </tr>
        <tr>
            <td>
                <p><a href="https://microsoft.com" target="_blank">microsoft.com</a></p>
            </td>
        </tr>
    </tbody>
</table>`;

Office.context.mailbox.item.body.setSignatureAsync(
  sig,
  {
    coercionType: "html",
  },
  function (asyncResult) {
    console.info("Done");
  }
);
  1. Create a new mail
  2. Wait for the signature to be inserted, but don't write anything in the mail body
  3. Click on "open in new window"

IMPORTANT NOTE: I can only reproduce this bug about one time out of 2. Please try several times to reproduce.

Context

We are developing a signature addin. Clients are complaining that their signatures doesn't look the same before and after clicking on "Open in a new window".

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Jan 17, 2025
@ivanosevitch ivanosevitch changed the title Signature changes appearance after clicking on "Open in new window" Outlook signature changes appearance after clicking on "Open in new window" Jan 17, 2025
@Rick-Kirkham Rick-Kirkham added Needs: attention 👋 Waiting on Microsoft to provide feedback Area: Outlook Issue related to Outlook add-ins and removed Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP labels Jan 17, 2025
@megharai1302
Copy link
Collaborator

Thanks for reporting the issue, we are looking at it as a workaround can you try-
Modifying Signature HTML: Adjust the HTML of the signature to set the height of the td elements to auto attribute.

Hello Hello Hello

@megharai1302 megharai1302 added Needs: author feedback Waiting for author (creator) of Issue to provide more info and removed Needs: attention 👋 Waiting on Microsoft to provide feedback labels Jan 22, 2025
@ivanosevitch
Copy link
Author

As a workaround can you try- Modifying Signature HTML: Adjust the HTML of the signature to set the height of the td elements to auto attribute.

Thanks for the prompt answer :) I confirm that height: auto works as a workaround.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: attention 👋 Waiting on Microsoft to provide feedback and removed Needs: author feedback Waiting for author (creator) of Issue to provide more info labels Jan 23, 2025
@neprasad-microsoft neprasad-microsoft added Resolution: has workaround Problem can be avoided by implementing workaround and removed Needs: attention 👋 Waiting on Microsoft to provide feedback labels Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Outlook Issue related to Outlook add-ins Resolution: has workaround Problem can be avoided by implementing workaround
Projects
None yet
Development

No branches or pull requests

5 participants