Skip to content

Commit

Permalink
Merge branch 't/9771b'
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Dec 27, 2012
2 parents a6aa231 + 1fe0478 commit 8341c16
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugins/clipboard/plugin.js
Expand Up @@ -743,8 +743,15 @@
} );
}

var scrollTop = CKEDITOR.document.getWindow().getScrollPosition().y;

// Wait a while and grab the pasted contents.
setTimeout( function() {
// Restore main window's scroll position which could have been changed
// by browser in cases described in #9771.
if ( CKEDITOR.env.webkit || CKEDITOR.env.opera )
CKEDITOR.document[ CKEDITOR.env.webkit ? 'getBody' : 'getDocumentElement' ]().$.scrollTop = scrollTop;

// Blur will be fired only on non-native paste. In other case manually remove listener.
blurListener && blurListener.removeListener();

Expand Down

0 comments on commit 8341c16

Please sign in to comment.