var nonExitableElementNames = { table:1,pre:1 };\r
\r
// Matching an empty paragraph at the end of document.\r
var nonExitableElementNames = { table:1,pre:1 };\r
\r
// Matching an empty paragraph at the end of document.\r
+ // Memorize scroll position to restore it later (#4472).\r
+ var hostDocument = editor.element.getDocument();\r
+ var hostDocumentElement = hostDocument.getDocumentElement();\r
+ var scrollTop = hostDocumentElement.$.scrollTop;\r
+ var scrollLeft = hostDocumentElement.$.scrollLeft;\r
+\r
// Simulating keyboard character input by dispatching a keydown of white-space text.\r
var keyEventSimulate = doc.$.createEvent( "KeyEvents" );\r
keyEventSimulate.initKeyEvent( 'keypress', true, true, win.$, false,\r
false, false, false, 0, 32 );\r
doc.$.dispatchEvent( keyEventSimulate );\r
\r
// Simulating keyboard character input by dispatching a keydown of white-space text.\r
var keyEventSimulate = doc.$.createEvent( "KeyEvents" );\r
keyEventSimulate.initKeyEvent( 'keypress', true, true, win.$, false,\r
false, false, false, 0, 32 );\r
doc.$.dispatchEvent( keyEventSimulate );\r
\r
// Restore the original document status by placing the cursor before a bogus br created (#5021).\r
bodyChildsNum && body.getFirst().remove();\r
doc.getBody().appendBogus();\r
// Restore the original document status by placing the cursor before a bogus br created (#5021).\r
bodyChildsNum && body.getFirst().remove();\r
doc.getBody().appendBogus();\r
- // #5689 Running inside of Firefox chrome the load event doesn't bubble like in a normal page\r
- if (document.location.protocol == 'chrome:')\r
+ // Running inside of Firefox chrome the load event doesn't bubble like in a normal page (#5689)\r
+ if ( document.location.protocol == 'chrome:' )\r
CKEDITOR.event.useCapture = true;\r
\r
// With FF, it's better to load the data on iframe.load. (#3894,#4058)\r
CKEDITOR.event.useCapture = true;\r
\r
// With FF, it's better to load the data on iframe.load. (#3894,#4058)\r
+ // The container must be visible when creating the iframe in FF (#5956)\r
+ var element = editor.element,\r
+ isHidden = CKEDITOR.env.gecko && !element.isVisible(),\r
+ previousStyles = {};\r
+ if ( isHidden )\r
+ {\r
+ element.show();\r
+ previousStyles = {\r
+ position : element.getStyle( 'position' ),\r
+ top : element.getStyle( 'top' )\r
+ };\r
+ element.setStyles( { position : 'absolute', top : '-3000px' } );\r
+ }\r
+\r