/**
* Partially overwrites the 'paste' module.
*
- * - prevent screwed up, pasted HTML from placing text nodes (and inline elements) in the editor's direct root
+ * - prevent screwed up, pasted HTML from placing text nodes (and inline elements) in the editor's direct root
+ * - fixes text pasting in Internet Explorer 11 (#2040)
*/
paste: function() {
var $fixDOM = (function() {
this.paste.insert = (function(html) {
$mpInsert.call(this, html);
- setTimeout($fixDOM, 20);
+ setTimeout((function() {
+ $fixDOM();
+
+ if ($.browser.msie) {
+ getSelection().getRangeAt(0).collapse(true);
+ }
+
+ this.wutil.saveSelection();
+ }).bind(this), 20);
}).bind(this);
},