fixed: native rich pasting curly braces crashed chrome

This commit is contained in:
daboe01
2016-11-15 21:02:04 +01:00
parent b46b2f048d
commit 3c27e57b19
2 changed files with 3 additions and 6 deletions
+2 -5
View File
@@ -2536,10 +2536,9 @@ var _CPCopyPlaceholder = '-';
}
else if (node.nodeName === '#text')
[rtfdata appendAttributedString:[[CPAttributedString alloc] initWithString:node.nodeValue attributes:@{}]];
if (l > 1)
[rtfdata appendAttributedString:[[CPAttributedString alloc] initWithString:"\n" attributes:@{}]];
}
if (l > 1)
[rtfdata appendAttributedString:[[CPAttributedString alloc] initWithString:"\n" attributes:@{}]];
}
};
@@ -2587,8 +2586,6 @@ var _CPCopyPlaceholder = '-';
_CPDOMParsefunction(_CPNativeInputField.getElementsByTagName("p"));
[pasteboard declareTypes:[CPRTFPboardType] owner:nil];
var rtf = [_CPRTFProducer produceRTF:rtfdata documentAttributes:@{}];
debugger
[pasteboard setString:[_CPRTFProducer produceRTF:rtfdata documentAttributes:@{}] forType:CPRTFPboardType];
[[[CPApp keyWindow] firstResponder] paste:self];