Browse Source

Other: Remove focus handling from InsertTableView.

Maciej Gołaszewski 7 years ago
parent
commit
bf93fb205e

+ 0 - 30
packages/ckeditor5-table/src/ui/inserttableview.js

@@ -8,8 +8,6 @@
  */
 
 import View from '@ckeditor/ckeditor5-ui/src/view';
-import FocusTracker from '@ckeditor/ckeditor5-utils/src/focustracker';
-import FocusCycler from '@ckeditor/ckeditor5-ui/src/focuscycler';
 
 import './../../theme/inserttable.css';
 
@@ -38,34 +36,6 @@ export default class InsertTableView extends View {
 		this.items = this.createCollection();
 
 		/**
-		 * Tracks information about DOM focus in the list.
-		 *
-		 * @readonly
-		 * @member {module:utils/focustracker~FocusTracker}
-		 */
-		this.focusTracker = new FocusTracker();
-
-		/**
-		 * Helps cycling over focusable {@link #items} in the toolbar.
-		 *
-		 * @readonly
-		 * @protected
-		 * @member {module:ui/focuscycler~FocusCycler}
-		 */
-		this._focusCycler = new FocusCycler( {
-			focusables: this.items,
-			focusTracker: this.focusTracker,
-			keystrokeHandler: this.keystrokes,
-			actions: {
-				// Navigate toolbar items backwards using the arrow[left,up] keys.
-				focusPrevious: [ 'arrowleft', 'arrowup' ],
-
-				// Navigate toolbar items forwards using the arrow[right,down] keys.
-				focusNext: [ 'arrowright', 'arrowdown' ]
-			}
-		} );
-
-		/**
 		 * Currently selected number of rows of a new table.
 		 *
 		 * @observable

+ 0 - 5
packages/ckeditor5-table/tests/ui/inserttableview.js

@@ -5,7 +5,6 @@
 
 /* globals document, Event */
 
-import FocusTracker from '@ckeditor/ckeditor5-utils/src/focustracker';
 import ViewCollection from '@ckeditor/ckeditor5-ui/src/viewcollection';
 
 import InsertTableView from '../../src/ui/inserttableview';
@@ -43,10 +42,6 @@ describe( 'InsertTableView', () => {
 			expect( view.label ).to.equal( '0 x 0' );
 		} );
 
-		it( 'creates #focusTracker instance', () => {
-			expect( view.focusTracker ).to.be.instanceOf( FocusTracker );
-		} );
-
 		it( 'creates #element from template', () => {
 			expect( view.element.classList.contains( 'ck' ) ).to.be.true;
 			expect( view.element.children ).to.have.length( 2 );