Skip to content

Commit 34467c6

Browse files
committed
Merge branch 't/12112' into major
2 parents 1347d37 + 9d9997c commit 34467c6

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ CKEditor 4 Changelog
33

44
## CKEditor 4.5
55

6+
New Features:
7+
8+
* [#10931](http://dev.ckeditor.com/ticket/10931): Introduce ability to insert widgets into another widget's nested editables. Note that unless nested editable's [allowed content](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.nestedEditable.definition-property-allowedContent) is defined precisely since CKEditor 4.5 some widget buttons may become enabled.
9+
610
Fixed Issues:
711

812
* [#12018](http://dev.ckeditor.com/ticket/12018): [Nested widgets] Fixed and reviewed: Nested widgets garbage collection.

plugins/widget/plugin.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,14 +1710,6 @@
17101710
}
17111711
},
17121712

1713-
refresh: function( editor, path ) {
1714-
// Disable widgets' commands inside nested editables -
1715-
// check if blockLimit is a nested editable or a descendant of any.
1716-
this.setState( getNestedEditable( editor.editable(), path.blockLimit ) ? CKEDITOR.TRISTATE_DISABLED : CKEDITOR.TRISTATE_OFF );
1717-
},
1718-
// A hack to force command refreshing on context change.
1719-
context: 'div',
1720-
17211713
allowedContent: widgetDef.allowedContent,
17221714
requiredContent: widgetDef.requiredContent,
17231715
contentForms: widgetDef.contentForms,

tests/plugins/widget/nestededitables.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,9 @@
11471147
} );
11481148
},
11491149

1150-
'test widgets\' commands are disabled in nested editable': function() {
1150+
// Behaviour has been changed in 4.5 (#12112), so we're leaving this
1151+
// test as a validation of this change.
1152+
'test widgets\' commands are enabled in nested editable': function() {
11511153
var editor = this.editor,
11521154
bot = this.editorBot;
11531155

@@ -1172,7 +1174,7 @@
11721174
range.collapse( true );
11731175
range.select();
11741176

1175-
assert.areSame( CKEDITOR.TRISTATE_DISABLED, editor.commands.testcommand1.state, 'command is disabled in nested editable' );
1177+
assert.areSame( CKEDITOR.TRISTATE_OFF, editor.commands.testcommand1.state, 'command is enabled in nested editable' );
11761178
} );
11771179
},
11781180

0 commit comments

Comments
 (0)