Unplanned
Last Updated: 18 Mar 2021 08:27 by omti
omti
Created on: 18 Mar 2021 08:27
Category: Editor
Type: Bug Report
0
Editor throws errors when carraige return is pasted from Word in Chrome and Edge

Bug report

When a content containing carriage return is pasted from Word in the Editor and space or Enter is clicked at the end of the content JS error is thrown. The issue is reproducible in Chrome and Edge.

Reproduction of the problem

Issue 1:

  1. Open the attached file and the Dojo linked here.
    test.docx
  2. Select all by Ctrl + A, and paste it in the Editor
  3. In the file there is a row with text and two empty rows below. Move toward the 2nd row and type any words. (Use direction key, not Enter)
  4. Move toward the 3rd row and type any words. (Use direction key, not Enter)
  5. Press space key at the end of the 3rd row

Issue 2
Follow the same steps as above, but on step 6 press Enter instead of space

Current behavior

The following JS errors are thrown:

  1. DOMException: Failed to execute 'setStart' on 'Range': There is no child at offset 6.
  2. Failed to execute 'insertNode' on 'Range': Nodes of type 'A' may not be inserted inside nodes of type '#comment'.
    (screencast)

Expected/desired behavior

There should be no JS errors when a content with carriage return is pasted in the Word file and space or enter are pressed at the end of the pasted content.

Environment

  • Kendo UI version: 2021.1.224
  • Browser: [ Chrome | Edge ]
0 comments