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

Inline Editor throws an error when an image is dragged and dropped #7790

Open
kendo-bot opened this issue Apr 5, 2024 · 0 comments
Open
Labels
Bug C: Editor FP: Unplanned Sync status with associated Feedback Item jQuery SEV: Medium

Comments

@kendo-bot
Copy link
Contributor

kendo-bot commented Apr 5, 2024

Bug report

When using an Editor in Inline mode and dragging an image a JavaScript error is thrown: Uncaught TypeError: Cannot read properties of null (reading 'nodeType')

Reproduction of the problem

  1. Open the Dojo - https://dojo.telerik.com/@NeliK/aHOSABIr
  2. Click in the last Editor
  3. Drag an image to the first Editor

Current behavior

The image is opened in a new tab and an error Uncaught TypeError: Cannot read properties of null (reading 'nodeType') is displayed in the console. screencast - https://go.screenpal.com/watch/cZfhhVVsFgy

Expected/desired behavior

The image should be pasted in the focused Inline Editor

Suggested fix in ticket id 1646825

nodeToPath: function(node) {
         var path = [];

-        while (node != this.rootNode) {
+        while (node !== null && node != this.rootNode) {
             path.push(this.index(node));
-            node = node.parentNode;
+            node = node?.parentNode;
         }

         return path;

Environment

  • Kendo UI version: 2024.1.319
  • Browser: [all ]
@kendo-bot kendo-bot added the FP: Pending Review Sync status with associated Feedback Item label Apr 5, 2024
@github-actions github-actions bot added the FP: Unplanned Sync status with associated Feedback Item label Apr 5, 2024
@nelito987 nelito987 added Bug SEV: Medium C: Editor jQuery and removed FP: Pending Review Sync status with associated Feedback Item labels Apr 5, 2024
@nelito987 nelito987 changed the title Inline Editor throws an error whe an image is dragged and dropped Inline Editor throws an error when an image is dragged and dropped Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug C: Editor FP: Unplanned Sync status with associated Feedback Item jQuery SEV: Medium
Projects
None yet
Development

No branches or pull requests

2 participants