// the command to execute.\r
body.on( command, onExec );\r
\r
- doc.$.execCommand( command );\r
+ // IE6/7: document.execCommand has problem to paste into positioned element.\r
+ ( CKEDITOR.env.version > 7 ? doc.$ : doc.$.selection.createRange() ) [ 'execCommand' ]( command );\r
\r
body.removeListener( command, onExec );\r
\r
doc.getBody().append( pastebin );\r
\r
// It's definitely a better user experience if we make the paste-bin pretty unnoticed\r
- // by pulling it off the screen, while this hack will make the paste-bin a control type element\r
- // and that become a selection plain later.\r
- if ( !CKEDITOR.env.ie && mode != 'html' )\r
- {\r
- pastebin.setStyles(\r
- {\r
- position : 'absolute',\r
- left : '-1000px',\r
- // Position the bin exactly at the position of the selected element\r
- // to avoid any subsequent document scroll.\r
- top : sel.getStartElement().getDocumentPosition().y + 'px',\r
- width : '1px',\r
- height : '1px',\r
- overflow : 'hidden'\r
- });\r
- }\r
+ // by pulling it off the screen.\r
+ pastebin.setStyles(\r
+ {\r
+ position : 'absolute',\r
+ left : '-1000px',\r
+ // Position the bin exactly at the position of the selected element\r
+ // to avoid any subsequent document scroll.\r
+ top : sel.getStartElement().getDocumentPosition().y + 'px',\r
+ width : '1px',\r
+ height : '1px',\r
+ overflow : 'hidden'\r
+ });\r
\r
var bms = sel.createBookmarks();\r
\r