Browse Source

Merge pull request #18 from ckeditor/t/11

Fix: The toolbar should not collapse when the window is narrow. Closes #11.
Szymon Kupś 8 years ago
parent
commit
8c95b93c68

+ 6 - 1
packages/ckeditor5-editor-inline/src/inlineeditoruiview.js

@@ -59,7 +59,12 @@ export default class InlineEditorUIView extends EditorUIView {
 
 		Template.extend( this.toolbar.template, {
 			attributes: {
-				class: 'ck-editor-toolbar'
+				class: [
+					'ck-editor-toolbar',
+
+					// https://github.com/ckeditor/ckeditor5-editor-inline/issues/11
+					'ck-toolbar_floating'
+				]
 			}
 		} );
 

+ 5 - 0
packages/ckeditor5-editor-inline/tests/inlineeditoruiview.js

@@ -26,6 +26,11 @@ describe( 'InlineEditorUIView', () => {
 			it( 'is given a locale object', () => {
 				expect( view.toolbar.locale ).to.equal( locale );
 			} );
+
+			it( 'is given the right CSS classes', () => {
+				expect( view.toolbar.element.classList.contains( 'ck-editor-toolbar' ) ).to.be.true;
+				expect( view.toolbar.element.classList.contains( 'ck-toolbar_floating' ) ).to.be.true;
+			} );
 		} );
 
 		describe( '#panel', () => {