Skip to content

Commit

Permalink
Merge branch 't/14620'
Browse files Browse the repository at this point in the history
  • Loading branch information
Tade0 committed May 6, 2016
2 parents bb8028d + 9550af6 commit 8c6c99a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -5,6 +5,7 @@ CKEditor 4 Changelog

Fixed Issues:

* [#14620](https://dev.ckeditor.com/ticket/14620): Fixed: Setting both the `min-height` style for the `<body>` element and the `height` style for the `<html>` element breaks [Auto Grow](http://ckeditor.com/addon/autogrow) plugin.
* [#14538](http://dev.ckeditor.com/ticket/14538): Fixed: Keyboard focus goes into embedded iframe element.
* [#14602](http://dev.ckeditor.com/ticket/14602): Fixed: [dom.element.removeAttribute()](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-removeAttribute) method does not remove all attributes if no parameter is given.
* [#8679](http://dev.ckeditor.com/ticket/8679): Fixed: Better focus indication and ability to style selected color in the color picker dialog.
Expand Down
8 changes: 8 additions & 0 deletions plugins/autogrow/plugin.js
Expand Up @@ -91,6 +91,14 @@
// Quirks mode overflows body, standards overflows document element.
scrollable = CKEDITOR.env.quirks ? doc.getBody() : doc.getDocumentElement();

// Reset scrollable body height and min-height css values.
// While set by outside code it may break resizing. (#14620)
var body = CKEDITOR.env.quirks ? scrollable : scrollable.findOne( 'body' );
if ( body ) {
body.setStyle( 'height', 'auto' );
body.setStyle( 'min-height', 'auto' );
}

marker = CKEDITOR.dom.element.createFromHtml(
'<span style="margin:0;padding:0;border:0;clear:both;width:1px;height:1px;display:block;">' +
( CKEDITOR.env.webkit ? '&nbsp;' : '' ) +
Expand Down
11 changes: 11 additions & 0 deletions tests/plugins/autogrow/manual/14620.html
@@ -0,0 +1,11 @@
<div contenteditable="true" id="editor">
<h1>Hello world!</h1>
<p>I&#39;m an instance of <a href="http://ckeditor.com">CKEditor</a>.</p>
</div>

<script>
CKEDITOR.addCss( 'html{height:100%;} body{min-height:100%;}' );
var editor = CKEDITOR.replace( 'editor', {
allowedContent: true
} );
</script>
9 changes: 9 additions & 0 deletions tests/plugins/autogrow/manual/14620.md
@@ -0,0 +1,9 @@
@bender-tags: 4.5.9, tc, 14620
@bender-ui: collapsed
@bender-ckeditor-plugins: wysiwygarea, toolbar, basicstyles, autogrow

1. Type few additional lines inside editor.

#### Expected result:

Editor height should change as you type and whole content should be visible. Vertical scroll should not be visible.

0 comments on commit 8c6c99a

Please sign in to comment.