Przeglądaj źródła

Update balloon position after toggling navigation buttons.

Oskar Wróbel 6 lat temu
rodzic
commit
8ca23beb7e

+ 3 - 0
packages/ckeditor5-ui/src/panel/balloon/contextualballoon.js

@@ -324,6 +324,9 @@ export default class ContextualBalloon extends Plugin {
 		// Hide navigation when there is only a one panel.
 		view.bind( 'isNavigationVisible' ).to( this._panels, 'length', value => value > 1 );
 
+		// Update panel position after toggling navigation.
+		view.on( 'change:isNavigationVisible', () => ( this.updatePosition() ), { priority: 'low' } );
+
 		// Show panels counter.
 		view.bind( 'counter' ).to( this, '_visiblePanel', this._panels, 'length', ( panel, length ) => {
 			if ( !panel ) {