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
687 stars 94 forks source link

On web, the system cannot handle some large html inserted on a content control #4841

Open benjamin-almarza opened 2 months ago

benjamin-almarza commented 2 months ago

When we insert some large html inside of content control, the system struggle to process where is the content control. The box that surrounds the content control fails to find where the content control is.

We don't experience this problem on desktop. Though, on Desktop we insert ooxml.

Your Environment

Expected behavior

The system shall be able to handle large content control in the same way than small one. The box that limits the content control shall surround the content control

Current behavior

On inserting a large html inside of a content control on web, the box that surround the content control fails to detect where the content control starts and where it ends. On clicking in the middle of the inserted content control the system don't recognise that it is inside of a content control

On inserting the content as you can see the box is skewed to the left, and starts before the actual insertion Screenshot 2024-08-28 at 3 19 49 PM

If you navigate the document, sometimes the content control area changes and more of the insertion get covered. As you can see in the picture, though as you can see some of the insertion was left out. Screenshot 2024-08-28 at 3 20 33 PM

In this case almost all the insertion was covered by the content control Screenshot 2024-08-28 at 3 19 03 PM

On the three cases, the only thing we did was to run the code I attached and then navigate into the document. Most of the time the content control box get stuck as the first picture, but sometimes it increases the area as the two other images I shared.

Steps to reproduce

In the addin, in the web context run the following code:

execute.txt

Context

As part of our application, we allow the users to upload arbitrary content. And we should be able to surround that content in a content control.

The content could be as long as the one I shared

benjamin-almarza commented 2 months ago

(those comments above are malicious, please eliminate them)

shanshanzheng-dev commented 2 months ago

Hi @benjamin-almarza Thanks for reporting this issue. I can repro it. We'll take a look and report back if we have a suggestion for you. Thanks.

benjamin-almarza commented 2 months ago

@shanshanzheng-dev any news about problem?

shanshanzheng-dev commented 2 months ago

Hi @benjamin-almarza sorry for slow response. It has been put on our backlog <#9311294>. We unfortunately have no timelines to share at this point.