Skip to content

Commit

Permalink
Edge 16+ - always use pastebin with 'div' element..
Browse files Browse the repository at this point in the history
  • Loading branch information
f1ames committed Nov 17, 2017
1 parent 60d37d1 commit add6221
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions plugins/widget/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -3082,17 +3082,20 @@

function copySingleWidget( widget, isCut ) {
var editor = widget.editor,
doc = editor.document;
doc = editor.document,
isEdge16 = CKEDITOR.env.edge && CKEDITOR.env.version >= 16;

// We're still handling previous copy/cut.
// When keystroke is used to copy/cut this will also prevent
// conflict with copySingleWidget called again for native copy/cut event.
if ( doc.getById( 'cke_copybin' ) )
return;

// [IE] Use span for copybin and its container to avoid bug with expanding editable height by
// absolutely positioned element.
var copybinName = ( editor.blockless || ( CKEDITOR.env.ie && CKEDITOR.env.version < 16 ) ) ? 'span' : 'div',
// [IE] Use span for copybin and its container to avoid bug with expanding
// editable height by absolutely positioned element.
// For Edge 16+ always use div as span causes scrolling to the end of the document
// on widget cut (also for blockless editor) (#1160).
var copybinName = ( ( editor.blockless || CKEDITOR.env.ie ) && !isEdge16 ) ? 'span' : 'div',
copybin = doc.createElement( copybinName ),
copybinContainer = doc.createElement( copybinName ),
// IE8 always jumps to the end of document.
Expand Down

0 comments on commit add6221

Please sign in to comment.