From cdb2ef3ac795c88dfc38de54f177b3f3bba29d74 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sat, 20 Jun 2015 19:11:05 +0200 Subject: [PATCH] prevent dom-flickering --- AppKit/CPTextView/CPTextView.j | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/AppKit/CPTextView/CPTextView.j b/AppKit/CPTextView/CPTextView.j index 17378f244..5184c3380 100644 --- a/AppKit/CPTextView/CPTextView.j +++ b/AppKit/CPTextView/CPTextView.j @@ -2254,7 +2254,10 @@ var _CPCopyPlaceholder = '-'; } var currentFirstResponder = [[CPApp mainWindow] firstResponder]; - [currentFirstResponder paste:self]; + + setTimeout(function(){ // prevent dom-flickering + [currentFirstResponder paste:self]; + }, 20); e.preventDefault(); e.stopPropagation();