Author: Chia-liang Kao <clkao@clkao.org>
Date: Thu Oct 18 13:13:31 2012 +0800
Maintain current scroll position when pasting
diff --git a/_source/plugins/clipboard/plugin.js b/_source/plugins/clipboard/plugin.js
index 6c21f55..d4769ef 100644
a
|
b
|
For licensing, see LICENSE.html or http://ckeditor.com/license |
183 | 183 | |
184 | 184 | var sel = this.getSelection(), |
185 | 185 | range = new CKEDITOR.dom.range( doc ); |
| 186 | var scrollPosition = doc.getWindow().getScrollPosition(); |
186 | 187 | |
187 | 188 | // Create container to paste into |
188 | 189 | var pastebin = new CKEDITOR.dom.element( mode == 'text' ? 'textarea' : CKEDITOR.en |
… |
… |
For licensing, see LICENSE.html or http://ckeditor.com/license |
229 | 230 | |
230 | 231 | editor.removeListener( 'selectionChange', cancel ); |
231 | 232 | |
| 233 | win.$.scrollTo(scrollPosition.x, scrollPosition.y); |
| 234 | |
232 | 235 | // IE7: selection must go before removing paste bin. (#8691) |
233 | 236 | if ( CKEDITOR.env.ie7Compat ) |
234 | 237 | { |