瀏覽代碼

Merge pull request #71 from ckeditor/t/70

t/70: Updated link after focusTracker moved from editor to editor.ui.
Piotrek Koszuliński 9 年之前
父節點
當前提交
7afa1b32fa
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 2 2
      packages/ckeditor5-link/src/link.js
  2. 2 2
      packages/ckeditor5-link/tests/link.js

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

@@ -136,7 +136,7 @@ export default class Link extends Feature {
 
 		// Add balloonPanel.view#element to FocusTracker.
 		// @TODO: Do it automatically ckeditor5-core#23
-		editor.focusTracker.add( balloonPanelView.element );
+		editor.ui.focusTracker.add( balloonPanelView.element );
 
 		// Handle click on view document and show panel when selection is placed inside the link element.
 		// Keep panel open until selection will be inside the same link element.
@@ -176,7 +176,7 @@ export default class Link extends Feature {
 			callback: () => this._hidePanel()
 		} );
 
-		editor.ui.body.add( balloonPanelView );
+		editor.ui.view.body.add( balloonPanelView );
 
 		return balloonPanelView;
 	}

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

@@ -170,11 +170,11 @@ describe( 'Link', () => {
 		} );
 
 		it( 'should add balloon panel element to focus tracker', () => {
-			editor.focusTracker.isFocused = false;
+			editor.ui.focusTracker.isFocused = false;
 
 			balloonPanelView.element.dispatchEvent( new Event( 'focus' ) );
 
-			expect( editor.focusTracker.isFocused ).to.true;
+			expect( editor.ui.focusTracker.isFocused ).to.true;
 		} );
 
 		describe( 'close listeners', () => {