8
0
Quellcode durchsuchen

Added extra class to blockToolbar.panelView.

Damian Konopka vor 7 Jahren
Ursprung
Commit
1343fcbdbd

+ 1 - 0
packages/ckeditor5-ui/src/toolbar/block/blocktoolbar.js

@@ -121,6 +121,7 @@ export default class BlockToolbar extends Plugin {
 		const panelView = new BalloonPanelView( editor.locale );
 
 		panelView.content.add( this.toolbarView );
+		panelView.className = 'ck-balloon-panel-block-toolbar';
 		editor.ui.view.body.add( panelView );
 		editor.ui.focusTracker.add( panelView.element );
 

+ 4 - 0
packages/ckeditor5-ui/tests/toolbar/block/blocktoolbar.js

@@ -70,6 +70,10 @@ describe( 'BlockToolbar', () => {
 				expect( blockToolbar.panelView ).to.instanceof( BalloonPanelView );
 			} );
 
+			it( 'should have additional class name', () => {
+				expect( blockToolbar.panelView.className ).to.equal( 'ck-balloon-panel-block-toolbar' );
+			} );
+
 			it( 'should be added to ui.view.body collection', () => {
 				expect( Array.from( editor.ui.view.body ) ).to.include( blockToolbar.panelView );
 			} );