diff --git a/core/modules/ckeditor/js/ckeditor.js b/core/modules/ckeditor/js/ckeditor.js index 892621f..bfc560a 100644 --- a/core/modules/ckeditor/js/ckeditor.js +++ b/core/modules/ckeditor/js/ckeditor.js @@ -89,20 +89,20 @@ // A temporary workaround to control scrollbar appearance when using // autoGrow event to control editor's height. // @todo Remove when http://dev.ckeditor.com/ticket/12120 is fixed. - editor.on('mode', function() { + editor.on('mode', function () { var editable = editor.editable(); if (!editable.isInline()) { - editor.on('autoGrow', function( evt ) { - var doc = evt.editor.document, - scrollable = CKEDITOR.env.quirks ? doc.getBody() : doc.getDocumentElement(); + editor.on('autoGrow', function (evt) { + var doc = evt.editor.document; + var scrollable = CKEDITOR.env.quirks ? doc.getBody() : doc.getDocumentElement(); - if ( scrollable.$.scrollHeight < scrollable.$.clientHeight ) { - scrollable.setStyle( 'overflow-y', 'hidden' ); + if (scrollable.$.scrollHeight < scrollable.$.clientHeight) { + scrollable.setStyle('overflow-y', 'hidden'); } else { - scrollable.removeStyle( 'overflow-y' ); + scrollable.removeStyle('overflow-y'); } - }, null, null, 10000 ); + }, null, null, 10000); } }); } @@ -294,7 +294,7 @@ }); // Formulate a default formula for the maximum autoGrow height. - $(document).on('drupalViewportOffsetChange', function() { + $(document).on('drupalViewportOffsetChange', function () { CKEDITOR.config.autoGrow_maxHeight = 0.7 * (window.innerHeight - displace.offsets.top - displace.offsets.bottom); });