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

Word Online has issue with insert order inside a content control #3599

Closed
1 of 3 tasks
lightman76 opened this issue Aug 19, 2023 · 9 comments
Closed
1 of 3 tasks

Word Online has issue with insert order inside a content control #3599

lightman76 opened this issue Aug 19, 2023 · 9 comments
Assignees
Labels
Area: Word Issue related to Word add-ins Needs: author feedback Waiting for author (creator) of Issue to provide more info Status: no recent activity Issue or PR is stale (no recent activity)

Comments

@lightman76
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.]: Word
  • Office version number: Build: 16.0.16816.41004
  • Operating System: macOS
  • Browser (if using Office on the web): Chrome

Expected behavior

Expect that Word Online should insert the paragraphs in the order of the calls when calling
contentControl.insertParagraph("my text...", Word.InsertLocation.end)
multiple times. The same code works as expected in Desktop Word (MacOS and Windows). See screenshot from MacOS desktop Word.

Current behavior

Paragraphs are inserted in reverse order. See screenshot from Word Online.

Steps to reproduce

  1. Using OfficeJS, append two paragraphs to the end of the document and then insert the content control into the first one (the need to insert the second paragraph is a separate bug I'll try to reproduce in an example and file later).
  2. Call context.sync
  3. Insert several paragraphs into the content control using insert location of "End"
  4. Call context.sync
    The paragraphs in Word online show up in the reverse order of insertion, where as on Desktop Word they appear in the inserted order.

Link to live example(s)

I set up a simple add-in for Word to show the example before I saw these instructions for ScriptLab. I've quickly made a script lab version here
Running this will insert a content control in the document as described above with paragraphs which contain the numeric order in which they were inserted. In Word Online, they're reversed from the Desktop Word order.

If you want to see the add-in, the source can be found in GitHub and the add-in manifest can be found here

Sideload this add-in and add it to a document and launch it (opens a sidebar). Click the Insert Entries button in the sidebar and the content control will be created if it doesn't exist and then have 4 entries inserted.

Provide additional details

None required

Context

My company has an add-on, Scrible Writer, which manages in-text citations and bibliographies which is used in education. We use a content control for the bibliography to avoid users accidentally adding content in the bibliography since that area of the document gets refreshed periodically. Teachers aren't amused if the bibliography is in reverse alphabetical order.

Useful logs

Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Area: Word Issue related to Word add-ins label Aug 19, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: attention 👋 Waiting on Microsoft to provide feedback label Aug 19, 2023
@microsoft-github-policy-service
Copy link
Contributor

Thank you for letting us know about this issue. We will take a look shortly. Thanks.

@YijunMS
Copy link

YijunMS commented Aug 28, 2023

Hi @lightman76, thanks for reporting this issue to us. Work item(8237881) is created to track the progress of the this question. Once there's any update, we'll sync with you. Thanks again for reaching out to us.

@ZYUN-MSFT ZYUN-MSFT added Status: in backlog Issue is being tracked in the backlog but timeline for resolution is unknown and removed Needs: attention 👋 Waiting on Microsoft to provide feedback labels Aug 29, 2023
@xiruatms
Copy link

xiruatms commented Jun 3, 2024

@lightman76 , thanks for reporting this. There's no promised timeline regarding this yet. If you have more information for us to review the priority, that'll be great.

@xiruatms xiruatms added the Needs: author feedback Waiting for author (creator) of Issue to provide more info label Jun 3, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Status: no recent activity Issue or PR is stale (no recent activity) label Jun 7, 2024
@lightman76
Copy link
Author

Sorry - what feedback do you need from me?

The ScriptLab example still demonstrates the issue showing that the content is inserted into the content control in reverse order in Word Online.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: attention 👋 Waiting on Microsoft to provide feedback and removed Status: no recent activity Issue or PR is stale (no recent activity) Needs: author feedback Waiting for author (creator) of Issue to provide more info labels Jun 7, 2024
@xiruatms
Copy link

@lightman76 , thanks for your patience. The fix should be now on production, will yo please help to take a try?

@xiruatms xiruatms added Needs: author feedback Waiting for author (creator) of Issue to provide more info and removed Needs: attention 👋 Waiting on Microsoft to provide feedback Status: in backlog Issue is being tracked in the backlog but timeline for resolution is unknown labels Jul 30, 2024
@lightman76
Copy link
Author

Confirming that the fix works for the simplified ScriptLab example. In my real world add-on I'm now getting an error inserting the second paragraph which does not occur in desktop Word. Will investigate and let you know if it appears to be related to this issue.

@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 Jul 30, 2024
@xiruatms
Copy link

@lightman76 , are there any found? I will close this issue. But feel free to raise another one if you identified anything unexpected.

@xiruatms xiruatms 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 Aug 28, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

@microsoft-github-policy-service microsoft-github-policy-service bot added the Status: no recent activity Issue or PR is stale (no recent activity) label Sep 1, 2024
Copy link
Contributor

This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Word Issue related to Word add-ins Needs: author feedback Waiting for author (creator) of Issue to provide more info Status: no recent activity Issue or PR is stale (no recent activity)
Projects
None yet
Development

No branches or pull requests

5 participants