mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-08 18:01:00 +00:00
fixed: rich native pasting caused FF to flicker
This commit is contained in:
1 parent
b966c8cb0b
commit
30c1093c2f
1 file changed
+7
-1
@@ -2502,7 +2502,13 @@ var _CPCopyPlaceholder = '-';
|
||||
[pasteboard declareTypes:[CPRTFPboardType] owner:nil];
|
||||
[pasteboard setString:richtext forType:CPRTFPboardType];
|
||||
|
||||
[[[CPApp keyWindow] firstResponder] insertText:[[_CPRTFParser new] parseRTF:richtext]]
|
||||
// prevent flickering in FF
|
||||
if (CPBrowserIsEngine(CPGeckoBrowserEngine))
|
||||
setTimeout(function(){
|
||||
[[[CPApp keyWindow] firstResponder] insertText:[[_CPRTFParser new] parseRTF:richtext]]
|
||||
}, 20);
|
||||
else
|
||||
[[[CPApp keyWindow] firstResponder] insertText:[[_CPRTFParser new] parseRTF:richtext]]
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user