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

SetSignatureAsync inserts the signature in the wrong place when signature is reinserted #4937

Open
bogdanst24 opened this issue Oct 2, 2024 · 1 comment
Assignees
Labels
Area: Outlook Issue related to Outlook add-ins Needs: author feedback Waiting for author (creator) of Issue to provide more info

Comments

@bogdanst24
Copy link

Provide required information needed to triage your issue

Your Environment

  • Platform [PC desktop, Mac, iOS, Office on the web]: Office on the Web
  • Host [Excel, Word, PowerPoint, etc.]: Outlook
  • Office version number: online
  • Operating System: any
  • Browser (if using Office on the web): any

Expected behavior

With a web add-in that inserts email signatures both automatically (event-based) and manually (from a task pane), at any point in time the "setSignature" API is called, the signature is inserted in the right place, regardless of how the user manipulated the email or where the request comes from.

Current behavior

When the web add-in inserts a signature automatically (event-based, message composed) and the user removes it and starts writing content, the next signature inserted manually (setSignature through task pane) will be inserted in the middle of the email content instead of at the end.

Steps to reproduce

  1. Have a signature inserted automatically using an event-based add-in, on compose
  2. Click inside the email, select all and remove everything
  3. Start typing inside the message, multiple lines, something like:
Line 1
Line 2
Line 3
Line 4
  1. Open Script lab for Outlook with the signature sample and click setSignature
  2. Result: the signature will be inserted after Line 1, instead of being inserted after line 4

Provide additional details

There is an issue around the removal of the signature placeholder when deleting (step 2 in the steps to reproduce). This is visible when the font in compose mode is different than the font of the signature, as the first line will still be using the signature font, while the others will reset and get the email body font.
A workaround is to, when starting to type inside the message (step 3), write a character and then remove it. This is probably either deleting the signature placeholder or resetting the format. However, it is a workaround and we can't tell customers to just do that always.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Oct 2, 2024
@exextoc exextoc 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 Oct 2, 2024
@exextoc exextoc self-assigned this Oct 2, 2024
@shighosh-msft
Copy link

Hi @bogdanst24, this is not a repro for us. The script-lab set signature is adding the signature in the correct place even when an event-based add-ins runs before it and the cursor is moved at the top of the email. Can you share a minimal version of your event-based add-in that we can repro with? Please create a private GH repo and share with us here. Thanks!

@shighosh-msft shighosh-msft 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 Oct 3, 2024
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 Needs: author feedback Waiting for author (creator) of Issue to provide more info
Projects
None yet
Development

No branches or pull requests

3 participants