microsoftgraph / microsoft-graph-toolkit

Authentication Providers and UI components for Microsoft Graph 🦒
https://docs.microsoft.com/graph/toolkit/overview
Other
929 stars 291 forks source link

[BUG] [MGT-CHAT] Receiving an emoji causes "a component is contentEditable and contains children managed by React" #3060

Open plasne opened 5 months ago

plasne commented 5 months ago

Describe the bug Receiving an emoji raises an error message in the Chat component...

react-dom.development.js:67  Warning: A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.

To Reproduce Steps to reproduce the behavior:

  1. Open the console in the browser dev tools.
  2. Open a chat in MGT
  3. Send an emoji from Teams
  4. See error

Expected behavior I expect no errors when receiving content.

Screenshots

image

...results in...

image

Environment (please complete the following information):

Additional context I am a MSFT FTE and can be reached at pelasne in Teams.

gavinbarron commented 5 months ago

@musale can you take a little time to investigate here? I'd like to understand what if this is due to the approach of using renderAsString.

gavinbarron commented 5 months ago

@musale I found that removing the content editable attribute from the html we emit for the emoji seems to fix the problem, this will be in a PR that I'm about to raise.