Parcourir la source

Tests: Correct cleanup in BlockToolbar tests.

Krzysztof Krztoń il y a 7 ans
Parent
commit
b8e7da3311
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      packages/ckeditor5-ui/tests/toolbar/block/blocktoolbar.js

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

@@ -43,6 +43,9 @@ describe( 'BlockToolbar', () => {
 	} );
 
 	afterEach( () => {
+		// Blur editor so `blockToolbar.buttonView` `window.resize` listener is detached.
+		editor.ui.focusTracker.isFocused = false;
+
 		element.remove();
 		return editor.destroy();
 	} );