浏览代码

Tests work without focus.

Piotr Jasiun 9 年之前
父节点
当前提交
6c90108beb

+ 0 - 1
packages/ckeditor5-engine/tests/__template__.html

@@ -1,2 +1 @@
-<input type="text" id="focusPlaceholder" />
 <div contenteditable="true" id="editor"></div>

+ 2 - 2
packages/ckeditor5-engine/tests/editingcontroller.js

@@ -131,8 +131,6 @@ describe( 'EditingController', () => {
 		} );
 
 		beforeEach( () => {
-			document.getElementById( 'focusPlaceholder' ).focus();
-
 			model.selection.removeAllRanges();
 			modelRoot.removeChildren( 0, modelRoot.getChildCount() );
 
@@ -192,6 +190,8 @@ describe( 'EditingController', () => {
 				} );
 			} );
 
+			editing.view.focusedEditable = viewRoot;
+
 			const domSelection = document.getSelection();
 			domSelection.removeAllRanges();
 			const domBar = domRoot.childNodes[ 2 ].childNodes[ 0 ];