Skip to content

Commit 8341c16

Browse files
committed
Merge branch 't/9771b'
2 parents a6aa231 + 1fe0478 commit 8341c16

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

plugins/clipboard/plugin.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,8 +743,15 @@
743743
} );
744744
}
745745

746+
var scrollTop = CKEDITOR.document.getWindow().getScrollPosition().y;
747+
746748
// Wait a while and grab the pasted contents.
747749
setTimeout( function() {
750+
// Restore main window's scroll position which could have been changed
751+
// by browser in cases described in #9771.
752+
if ( CKEDITOR.env.webkit || CKEDITOR.env.opera )
753+
CKEDITOR.document[ CKEDITOR.env.webkit ? 'getBody' : 'getDocumentElement' ]().$.scrollTop = scrollTop;
754+
748755
// Blur will be fired only on non-native paste. In other case manually remove listener.
749756
blurListener && blurListener.removeListener();
750757

0 commit comments

Comments
 (0)