Completed
Last Updated: 26 Jan 2024 12:47 by ADMIN
Chris
Created on: 14 Sep 2021 13:50
Category: Editor
Type: Bug Report
1
Cannot prevent image that is dragged from filesystem into Editor from being added to widget

Bug report

We are trying to prevent users from dropping an image file from their computer directly onto the Editor with Firefox. When this happens the browser converts the image into a uri encoded version of the image. When we define a custom PasteCleanup function to handle this, the Editor will sometimes work as expected but other times it will throw an error when trying to execute the function. This seems to be random after each page load.

Reproduction of the problem

  1. Open this Dojo with Firefox
  2. Run the Dojo and drag and drop an image from your machine

Please note that the reproduction of the error is inconsistent. However the CustomPasteCleanUp doesn't prevent the addition of the image, nor does the prevention of the Drop event.

Screen capture of reproduction in ASP .NET Core.
Screen capture of reproduction in Dojo.
More information about issue and reproduction available in ticket: 1534730

Current behavior

An image file that is dragged and drop by the user to the Editor is always added to the widget.

Expected/desired behavior

The current behavior should be preventable and an error must not occur.

Environment

  • Kendo UI version: 2021.2.616
  • Browser: [ Chrome 93 | Firefox 92 ]
0 comments