Przeglądaj źródła

Renamed FocusManager to FocusTracker.

Oskar Wróbel 9 lat temu
rodzic
commit
5f8b591df8

+ 2 - 2
packages/ckeditor5-link/src/link.js

@@ -140,9 +140,9 @@ export default class Link extends Feature {
 		// Create the balloon panel instance.
 		// Create the balloon panel instance.
 		const balloonPanel = new LinkBalloonPanel( panelModel, new LinkBalloonPanelView( editor.locale ) );
 		const balloonPanel = new LinkBalloonPanel( panelModel, new LinkBalloonPanelView( editor.locale ) );
 
 
-		// Add balloonPanel.view#element to FocusManager.
+		// Add balloonPanel.view#element to FocusTracker.
 		// @TODO: Do it automatically ckeditor5-core#23
 		// @TODO: Do it automatically ckeditor5-core#23
-		editor.focusManager.add( balloonPanel.view.element );
+		editor.focusTracker.add( balloonPanel.view.element );
 
 
 		// Execute link command after clicking on balloon panel `Link` button.
 		// Execute link command after clicking on balloon panel `Link` button.
 		this.listenTo( panelModel, 'executeLink', () => {
 		this.listenTo( panelModel, 'executeLink', () => {

+ 1 - 3
packages/ckeditor5-link/src/ui/linkballoonpanel.js

@@ -177,9 +177,7 @@ export default class LinkBalloonPanel extends BalloonPanel {
 
 
 		unlinkModel.on( 'execute', () => this.model.fire( 'executeUnlink' ) );
 		unlinkModel.on( 'execute', () => this.model.fire( 'executeUnlink' ) );
 
 
-		const button = new Button( unlinkModel, new ButtonView( this.locale ) );
-
-		return button;
+		return new Button( unlinkModel, new ButtonView( this.locale ) );
 	}
 	}
 }
 }
 
 

+ 3 - 3
packages/ckeditor5-link/tests/link.js

@@ -168,12 +168,12 @@ describe( 'Link', () => {
 			expect( selectUrlInputSpy.calledOnce ).to.true;
 			expect( selectUrlInputSpy.calledOnce ).to.true;
 		} );
 		} );
 
 
-		it( 'should add balloon panel element to focus manager', () => {
-			editor.focusManager.isFocused = false;
+		it( 'should add balloon panel element to focus tracker', () => {
+			editor.focusTracker.isFocused = false;
 
 
 			balloonPanel.view.element.dispatchEvent( new Event( 'focus' ) );
 			balloonPanel.view.element.dispatchEvent( new Event( 'focus' ) );
 
 
-			expect( editor.focusManager.isFocused ).to.true;
+			expect( editor.focusTracker.isFocused ).to.true;
 		} );
 		} );
 
 
 		describe( 'binding', () => {
 		describe( 'binding', () => {