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

Offset in footnotes with Word online #4315

Open pdoyon-Druide opened 5 months ago

pdoyon-Druide commented 5 months ago

Offset in footnotes with Word online

Your Environment

Expected behavior

The text obtained from the “Word.Range” selection range is similar to the selected text. Replacing the selection inserts the desired text.

Current behavior

There is a mismatch in the range of footnotes with Word online. This behavior does not occur with the desktop application.

Link

snippet : https://gist.github.com/pdoyon-Druide/be200b89c57a8ef62734587dfa280926

Steps to reproduce

  1. Click on the reference of the first note to display the note's content.
  2. Click on the “Init” button.
  3. Click on the “Select” button.
  4. Click on the “Get selection” button.
  5. Click on the “Set selection” button.

Provide additional details

Here is a description of the 4 buttons displayed by the snippet. “Init” button -> Put the following sentence in the first note of the document: It’s a small note. “Select” button -> Selects the “small” string in the first note of the document. The “Get selection” button -> Displays the content of the selection in the console. The “Set selection” button -> Replaces the selection with the “large” string.

Context

Our organization implements a spell checker. We would like to correct the footnotes.

Useful logs

Capture

shanshanzheng-dev commented 2 months ago

Hi @pdoyon-Druide Thanks for reporting this issue. we'll be looking into this and will report back when we have a suggestion for you. Thanks.