// With IE, the custom domain has to be taken care at first,\r
// for other browers, the 'src' attribute should be left empty to\r
// trigger iframe's 'load' event.\r
// With IE, the custom domain has to be taken care at first,\r
// for other browers, the 'src' attribute should be left empty to\r
// trigger iframe's 'load' event.\r
if ( CKEDITOR.env.air ) {\r
src = 'javascript:void(0)'; // jshint ignore:line\r
} else if ( CKEDITOR.env.ie && !CKEDITOR.env.edge ) {\r
if ( CKEDITOR.env.air ) {\r
src = 'javascript:void(0)'; // jshint ignore:line\r
} else if ( CKEDITOR.env.ie && !CKEDITOR.env.edge ) {\r
if ( CKEDITOR.env.ie && !CKEDITOR.env.edge ) {\r
doc.getDocumentElement().addClass( doc.$.compatMode );\r
}\r
\r
if ( CKEDITOR.env.ie && !CKEDITOR.env.edge ) {\r
doc.getDocumentElement().addClass( doc.$.compatMode );\r
}\r
\r
if ( CKEDITOR.env.ie && !CKEDITOR.env.edge && editor.enterMode != CKEDITOR.ENTER_P ) {\r
removeSuperfluousElement( 'p' );\r
} else if ( CKEDITOR.env.edge && editor.enterMode != CKEDITOR.ENTER_DIV ) {\r
removeSuperfluousElement( 'div' );\r
}\r
\r
if ( CKEDITOR.env.ie && !CKEDITOR.env.edge && editor.enterMode != CKEDITOR.ENTER_P ) {\r
removeSuperfluousElement( 'p' );\r
} else if ( CKEDITOR.env.edge && editor.enterMode != CKEDITOR.ENTER_DIV ) {\r
removeSuperfluousElement( 'div' );\r
}\r
\r
// Fix for older IEs (8-10 and QM) is placed inside selection.js.\r
if ( CKEDITOR.env.webkit || ( CKEDITOR.env.ie && CKEDITOR.env.version > 10 ) ) {\r
doc.getDocumentElement().on( 'mousedown', function( evt ) {\r
// Fix for older IEs (8-10 and QM) is placed inside selection.js.\r
if ( CKEDITOR.env.webkit || ( CKEDITOR.env.ie && CKEDITOR.env.version > 10 ) ) {\r
doc.getDocumentElement().on( 'mousedown', function( evt ) {\r
if ( CKEDITOR.env.ie ) {\r
setTimeout( function() {\r
editor.getSelection().scrollIntoView();\r
if ( CKEDITOR.env.ie ) {\r
setTimeout( function() {\r
editor.getSelection().scrollIntoView();\r
// Page up/down cause editor selection to leak\r
// outside of editable thus we try to intercept\r
// the behavior, while it affects only happen\r
// Page up/down cause editor selection to leak\r
// outside of editable thus we try to intercept\r
// the behavior, while it affects only happen\r
else if ( editor.window.$.innerHeight > this.$.offsetHeight ) {\r
var range = editor.createRange();\r
range[ keyCode == 33 ? 'moveToElementEditStart' : 'moveToElementEditEnd' ]( this );\r
else if ( editor.window.$.innerHeight > this.$.offsetHeight ) {\r
var range = editor.createRange();\r
range[ keyCode == 33 ? 'moveToElementEditStart' : 'moveToElementEditEnd' ]( this );\r
// focus is moved onto a non-editing host, e.g. link or button, but\r
// it becomes a problem for the object type selection, since the resizer\r
// handler attached on it will mark other part of the UI, especially\r
// focus is moved onto a non-editing host, e.g. link or button, but\r
// it becomes a problem for the object type selection, since the resizer\r
// handler attached on it will mark other part of the UI, especially\r
//\r
// Now the range restore is disabled, so we simply force IE to clean\r
// up the selection before blur.\r
this.attachListener( doc, 'blur', function() {\r
//\r
// Now the range restore is disabled, so we simply force IE to clean\r
// up the selection before blur.\r
this.attachListener( doc, 'blur', function() {\r
\r
if ( CKEDITOR.env.iOS ) {\r
// [iOS] If touch is bound to any parent of the iframe blur happens on any touch\r
\r
if ( CKEDITOR.env.iOS ) {\r
// [iOS] If touch is bound to any parent of the iframe blur happens on any touch\r
this.attachListener( doc, 'touchend', function() {\r
win.focus();\r
} );\r
}\r
\r
var title = editor.document.getElementsByTag( 'title' ).getItem( 0 );\r
this.attachListener( doc, 'touchend', function() {\r
win.focus();\r
} );\r
}\r
\r
var title = editor.document.getElementsByTag( 'title' ).getItem( 0 );\r
title.data( 'cke-title', title.getText() );\r
\r
// [IE] JAWS will not recognize the aria label we used on the iframe\r
title.data( 'cke-title', title.getText() );\r
\r
// [IE] JAWS will not recognize the aria label we used on the iframe\r
// 2. On keyup remove all elements that were not marked\r
// as non-superfluous (which means they must have had appeared in the meantime).\r
// Also we should preserve all temporary elements inserted by editor – otherwise we'd likely\r
// 2. On keyup remove all elements that were not marked\r
// as non-superfluous (which means they must have had appeared in the meantime).\r
// Also we should preserve all temporary elements inserted by editor – otherwise we'd likely\r
editable.attachListener( editable, 'keyup', function() {\r
var elements = doc.getElementsByTag( tagName );\r
if ( lockRetain ) {\r
editable.attachListener( editable, 'keyup', function() {\r
var elements = doc.getElementsByTag( tagName );\r
if ( lockRetain ) {\r
\r
this._.frameLoadedHandler = CKEDITOR.tools.addFunction( function( win ) {\r
// Avoid opening design mode in a frame window thread,\r
\r
this._.frameLoadedHandler = CKEDITOR.tools.addFunction( function( win ) {\r
// Avoid opening design mode in a frame window thread,\r
CKEDITOR.tools.setTimeout( onDomReady, 0, this, win );\r
}, this );\r
\r
CKEDITOR.tools.setTimeout( onDomReady, 0, this, win );\r
}, this );\r
\r
var bootstrapCode =\r
'<script id="cke_actscrpt" type="text/javascript"' + ( CKEDITOR.env.ie ? ' defer="defer" ' : '' ) + '>' +\r
'var wasLoaded=0;' + // It must be always set to 0 as it remains as a window property.\r
var bootstrapCode =\r
'<script id="cke_actscrpt" type="text/javascript"' + ( CKEDITOR.env.ie ? ' defer="defer" ' : '' ) + '>' +\r
'var wasLoaded=0;' + // It must be always set to 0 as it remains as a window property.\r
if ( baseTag && CKEDITOR.env.ie && CKEDITOR.env.version < 10 ) {\r
bootstrapCode +=\r
'<script id="cke_basetagscrpt">' +\r
if ( baseTag && CKEDITOR.env.ie && CKEDITOR.env.version < 10 ) {\r
bootstrapCode +=\r
'<script id="cke_basetagscrpt">' +\r
if ( CKEDITOR.env.gecko && config.enterMode != CKEDITOR.ENTER_BR )\r
data = data.replace( /<br>(?=\s*(:?$|<\/body>))/, '' );\r
\r
if ( CKEDITOR.env.gecko && config.enterMode != CKEDITOR.ENTER_BR )\r
data = data.replace( /<br>(?=\s*(:?$|<\/body>))/, '' );\r
\r
CKEDITOR.tools.removeFunction( this._.frameLoadedHandler );\r
\r
// On IE, iframe is returned even after remove() method is called on it.\r
CKEDITOR.tools.removeFunction( this._.frameLoadedHandler );\r
\r
// On IE, iframe is returned even after remove() method is called on it.\r
if ( iframe && iframe.getParent() ) {\r
iframe.clearCustomData();\r
onResize = iframe.removeCustomData( 'onResize' );\r
if ( iframe && iframe.getParent() ) {\r
iframe.clearCustomData();\r
onResize = iframe.removeCustomData( 'onResize' );\r
\r
// IE BUG: When destroying editor DOM with the selection remains inside\r
// editing area would break IE7/8's selection system, we have to put the editing\r
\r
// IE BUG: When destroying editor DOM with the selection remains inside\r
// editing area would break IE7/8's selection system, we have to put the editing\r
if ( CKEDITOR.document.$.documentMode >= 8 ) {\r
css.push( 'html.CSS1Compat [contenteditable=false]{min-height:0 !important}' );\r
\r
if ( CKEDITOR.document.$.documentMode >= 8 ) {\r
css.push( 'html.CSS1Compat [contenteditable=false]{min-height:0 !important}' );\r
\r
else if ( CKEDITOR.env.gecko ) {\r
css.push( 'html{height:100% !important}' );\r
css.push( 'img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}' );\r
}\r
\r
else if ( CKEDITOR.env.gecko ) {\r
css.push( 'html{height:100% !important}' );\r
css.push( 'img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}' );\r
}\r
\r
- // #6341: The text cursor must be set on the editor area.\r
- // #6632: Avoid having "text" shape of cursor in IE7 scrollbars.\r
+ // http://dev.ckeditor.com/ticket/6341: The text cursor must be set on the editor area.\r
+ // http://dev.ckeditor.com/ticket/6632: Avoid having "text" shape of cursor in IE7 scrollbars.\r