fixed: transaction issue from the undo manager

This commit is contained in:
daboe01
2016-10-02 10:34:30 +02:00
parent 5f8d8988e3
commit ec4d29c327
+5 -2
View File
@@ -2039,9 +2039,12 @@ var kDelegateRespondsTo_textShouldBeginEditing
[self _deleteForRange:_selectionRange];
[self setSelectedRange:_movingSelection];
var dataForPasting = [pasteboard stringForType:CPRTFPboardType];
[self insertText:[[_CPRTFParser new] parseRTF:dataForPasting]];
// setTimeout is to a work around a transaction issue with the undomanager
setTimeout(function(){
[self insertText:[[_CPRTFParser new] parseRTF:dataForPasting]];
}, 0);
}
if ([pasteboard availableTypeFromArray:[CPColorDragType]])