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.
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.
An image file that is dragged and drop by the user to the Editor is always added to the widget.
The current behavior should be preventable and an error must not occur.