diff --git a/.travis.yml b/.travis.yml index d839093a..a8cc5428 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ language: node_js services: - xvfb node_js: -- '8' +- '10' cache: yarn: true branches: diff --git a/src/dropdown/dropdownview.js b/src/dropdown/dropdownview.js index f651e02c..8c836244 100644 --- a/src/dropdown/dropdownview.js +++ b/src/dropdown/dropdownview.js @@ -8,7 +8,6 @@ */ import View from '../view'; -import FocusTracker from '@ckeditor/ckeditor5-utils/src/focustracker'; import KeystrokeHandler from '@ckeditor/ckeditor5-utils/src/keystrokehandler'; import '../../theme/components/dropdown/dropdown.css'; @@ -155,14 +154,6 @@ export default class DropdownView extends View { */ this.set( 'panelPosition', 'auto' ); - /** - * Tracks information about DOM focus in the dropdown. - * - * @readonly - * @member {module:utils/focustracker~FocusTracker} - */ - this.focusTracker = new FocusTracker(); - /** * Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}. It manages * keystrokes of the dropdown: @@ -277,9 +268,6 @@ export default class DropdownView extends View { // Listen for keystrokes coming from within #element. this.keystrokes.listenTo( this.element ); - // Register #element in the focus tracker. - this.focusTracker.add( this.element ); - const closeDropdown = ( data, cancel ) => { if ( this.isOpen ) { this.buttonView.focus(); diff --git a/tests/dropdown/dropdownview.js b/tests/dropdown/dropdownview.js index d06114bb..15429ff6 100644 --- a/tests/dropdown/dropdownview.js +++ b/tests/dropdown/dropdownview.js @@ -5,7 +5,6 @@ import DropdownView from '../../src/dropdown/dropdownview'; import KeystrokeHandler from '@ckeditor/ckeditor5-utils/src/keystrokehandler'; -import FocusTracker from '@ckeditor/ckeditor5-utils/src/focustracker'; import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard'; import ButtonView from '../../src/button/buttonview'; import DropdownPanelView from '../../src/dropdown/dropdownpanelview'; @@ -72,10 +71,6 @@ describe( 'DropdownView', () => { expect( view.panelPosition ).to.equal( 'auto' ); } ); - it( 'creates #focusTracker instance', () => { - expect( view.focusTracker ).to.be.instanceOf( FocusTracker ); - } ); - it( 'creates #keystrokeHandler instance', () => { expect( view.keystrokes ).to.be.instanceOf( KeystrokeHandler ); } ); @@ -214,20 +209,6 @@ describe( 'DropdownView', () => { view.element.remove(); } ); - it( 'adds #element to #focusTracker', () => { - const view = new DropdownView( locale, - new ButtonView( locale ), - new DropdownPanelView( locale ) ); - - const spy = sinon.spy( view.focusTracker, 'add' ); - - view.render(); - sinon.assert.calledOnce( spy ); - sinon.assert.calledWithExactly( spy, view.element ); - - view.element.remove(); - } ); - describe( 'activates keyboard navigation for the dropdown', () => { it( 'so "arrowdown" opens the #panelView', () => { const keyEvtData = {