Pasting a large (>500kb) image into the editor in IE 11 renders the browser frozen for a significant time.
To reproduce:
1. Go here: http://demos.telerik.com/kendo-ui/editor/index
2. Open any image greater than 500kb in MS Paint. A larger image will make the problem worse.
3. Select all and copy the image.
4. Paste into the demo editor.
On my i7 machine, this takes around 24 seconds to unfreeze, and then the image is pasted normally. No other browsers exhibit this behavior.
After digging through the Editor source code, and placing timers in several locations within the "paste" function, I found that there is quite a bit of DOM manipulation going on, without the clipboard content being validated in any way.
My question is this: what is the best way to stop the execution of the paste function based on the size of the clipboard data? Is there something already within the Editor API that I'm missing? PasteCleanup doesn't fire until after the paste event, so a custom function there doesn't help. What I really need is something like a maxPasteSize option in the Editor instantiation, that will reject anything over that without manipulating the DOM.