8
0
Просмотр исходного кода

Renamed FocusManager to FocusTracker.

Oskar Wróbel 9 лет назад
Родитель
Сommit
5188415469

+ 3 - 3
packages/ckeditor5-editor-classic/src/classiceditorui.js

@@ -76,7 +76,7 @@ export default class ClassicEditorUI extends BoxedEditorUI {
 			config: this.editor.config.get( 'toolbar' )
 			config: this.editor.config.get( 'toolbar' )
 		} );
 		} );
 
 
-		model.bind( 'isActive' ).to( editor.focusManager, 'isFocused' );
+		model.bind( 'isActive' ).to( editor.focusTracker, 'isFocused' );
 
 
 		const toolbar = new StickyToolbar( model, new StickyToolbarView( editor.locale ), editor );
 		const toolbar = new StickyToolbar( model, new StickyToolbarView( editor.locale ), editor );
 		this.add( 'top', toolbar );
 		this.add( 'top', toolbar );
@@ -85,7 +85,7 @@ export default class ClassicEditorUI extends BoxedEditorUI {
 	}
 	}
 
 
 	/**
 	/**
-	 * Creates the main editable of the editor and registers it in {@link core.editor.Editor#focusManager}.
+	 * Creates the main editable of the editor and registers it in {@link core.editor.Editor#focusTracker}.
 	 *
 	 *
 	 * @protected
 	 * @protected
 	 * @returns {ui.editableUI.EditableUI}
 	 * @returns {ui.editableUI.EditableUI}
@@ -99,7 +99,7 @@ export default class ClassicEditorUI extends BoxedEditorUI {
 		this.add( 'main', editableUI );
 		this.add( 'main', editableUI );
 
 
 		// @TODO: Do it automatically ckeditor5-core#23
 		// @TODO: Do it automatically ckeditor5-core#23
-		editor.focusManager.add( editableUI.view.element );
+		editor.focusTracker.add( editableUI.view.element );
 
 
 		return editableUI;
 		return editableUI;
 	}
 	}

+ 5 - 5
packages/ckeditor5-editor-classic/tests/classiceditorui.js

@@ -45,10 +45,10 @@ describe( 'ClassicEditorUI', () => {
 			expect( editorUI.toolbar.view ).to.be.instanceof( StickyToolbarView );
 			expect( editorUI.toolbar.view ).to.be.instanceof( StickyToolbarView );
 		} );
 		} );
 
 
-		it( 'binds editorUI.toolbar#model to editor.focusManager', () => {
+		it( 'binds editorUI.toolbar#model to editor.focusTracker', () => {
 			expect( editorUI.toolbar.model.isActive ).to.false;
 			expect( editorUI.toolbar.model.isActive ).to.false;
 
 
-			editor.focusManager.isFocused = true;
+			editor.focusTracker.isFocused = true;
 
 
 			expect( editorUI.toolbar.model.isActive ).to.true;
 			expect( editorUI.toolbar.model.isActive ).to.true;
 		} );
 		} );
@@ -58,14 +58,14 @@ describe( 'ClassicEditorUI', () => {
 			expect( editorUI.editable.view ).to.be.instanceof( InlineEditableUIView );
 			expect( editorUI.editable.view ).to.be.instanceof( InlineEditableUIView );
 		} );
 		} );
 
 
-		it( 'registers editable element in editor Focus Manager', () => {
+		it( 'registers editable element in editor Focus Tracker', () => {
 			return editorUI.init()
 			return editorUI.init()
 				.then( () => {
 				.then( () => {
-					editor.focusManager.isFocused = false;
+					editor.focusTracker.isFocused = false;
 
 
 					editorUI.editable.view.element.dispatchEvent( new Event( 'focus' ) );
 					editorUI.editable.view.element.dispatchEvent( new Event( 'focus' ) );
 
 
-					expect( editor.focusManager.isFocused ).to.true;
+					expect( editor.focusTracker.isFocused ).to.true;
 				} );
 				} );
 		} );
 		} );
 	} );
 	} );