Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge branch 't/ckeditor5/416e' into t/ckeditor5/416d
Browse files Browse the repository at this point in the history
  • Loading branch information
oleq committed Oct 14, 2019
2 parents 0fd2480 + cd07983 commit e439ed1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/classiceditorui.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ export default class ClassicEditorUI extends EditorUI {
view.stickyPanel.viewportTopOffset = this._toolbarConfig.viewportTopOffset;
}

view.toolbar.shouldGroupWhenFull = true;
view.toolbar.fillFromConfig( this._toolbarConfig.items, this.componentFactory );

enableToolbarKeyboardFocus( {
Expand Down
4 changes: 3 additions & 1 deletion src/classiceditoruiview.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ export default class ClassicEditorUIView extends BoxedEditorUIView {
* @readonly
* @member {module:ui/toolbar/toolbarview~ToolbarView}
*/
this.toolbar = new ToolbarView( locale );
this.toolbar = new ToolbarView( locale, {
shouldGroupWhenFull: true
} );

/**
* Editable UI view.
Expand Down
4 changes: 0 additions & 4 deletions tests/classiceditorui.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,6 @@ describe( 'ClassicEditorUI', () => {
} );

describe( 'view.toolbar', () => {
it( 'has automatic items grouping enabled', () => {
expect( view.toolbar.shouldGroupWhenFull ).to.be.true;
} );

describe( '#items', () => {
it( 'are filled with the config.toolbar (specified as an Array)', () => {
return VirtualClassicTestEditor
Expand Down
4 changes: 4 additions & 0 deletions tests/classiceditoruiview.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ describe( 'ClassicEditorUIView', () => {
it( 'is put into the "stickyPanel.content" collection', () => {
expect( view.stickyPanel.content.get( 0 ) ).to.equal( view.toolbar );
} );

it( 'has automatic items grouping enabled', () => {
expect( view.toolbar.options.shouldGroupWhenFull ).to.be.true;
} );
} );

describe( '#editable', () => {
Expand Down

0 comments on commit e439ed1

Please sign in to comment.