From e32c2abb311e0e80fb84327dbe5df4d0e6942df0 Mon Sep 17 00:00:00 2001 From: "k.krzton" Date: Wed, 4 May 2016 12:12:18 +0200 Subject: [PATCH 1/3] Autogrow should reset scrollable body css height value. --- plugins/autogrow/plugin.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/autogrow/plugin.js b/plugins/autogrow/plugin.js index 09bffed1a62..1006e616538 100644 --- a/plugins/autogrow/plugin.js +++ b/plugins/autogrow/plugin.js @@ -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( '' + ( CKEDITOR.env.webkit ? ' ' : '' ) + From 4baea1874f6975ebb6df098ef13ee27d3f2e0dc5 Mon Sep 17 00:00:00 2001 From: "k.krzton" Date: Wed, 4 May 2016 13:39:27 +0200 Subject: [PATCH 2/3] Tests: autogrow manual test with css overwriting scrollable height. --- tests/plugins/autogrow/manual/14620.html | 11 +++++++++++ tests/plugins/autogrow/manual/14620.md | 9 +++++++++ 2 files changed, 20 insertions(+) create mode 100755 tests/plugins/autogrow/manual/14620.html create mode 100755 tests/plugins/autogrow/manual/14620.md diff --git a/tests/plugins/autogrow/manual/14620.html b/tests/plugins/autogrow/manual/14620.html new file mode 100755 index 00000000000..157fcefb46f --- /dev/null +++ b/tests/plugins/autogrow/manual/14620.html @@ -0,0 +1,11 @@ +
+

Hello world!

+

I'm an instance of CKEditor.

+
+ + diff --git a/tests/plugins/autogrow/manual/14620.md b/tests/plugins/autogrow/manual/14620.md new file mode 100755 index 00000000000..4206fe5086e --- /dev/null +++ b/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. From 9550af6375c2e32d332a559b51fe8e8736318e7b Mon Sep 17 00:00:00 2001 From: Tadeusz Piskozub Date: Fri, 6 May 2016 16:53:19 +0200 Subject: [PATCH 3/3] Changelog entry. --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 5237189d805..9bc5ca5d611 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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 `` element and the `height` style for the `` 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.