Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Fix: Error thrown when navigating into the table insertion panel usin…
Browse files Browse the repository at this point in the history
…g the keyboard.
  • Loading branch information
jodator committed Jun 11, 2018
1 parent 4984682 commit fd8b1b8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/ui/inserttableview.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import './../../theme/inserttable.css';
* It renders a 10x10 grid to choose inserted table size.
*
* @extends module:ui/view~View
* @implements module:ui/dropdown/dropdownpanelfocusable~DropdownPanelFocusable
*/
export default class InsertTableView extends View {
/**
Expand Down Expand Up @@ -121,6 +122,22 @@ export default class InsertTableView extends View {
} );
}

/**
* @inheritDoc
*/
focus() {
// The dropdown panel expects DropdownPanelFocusable interface on views passed to dropdown panel. See #30.
// The method should be implemented while working on keyboard support for this view. See #22.
}

/**
* @inheritDoc
*/
focusLast() {
// The dropdown panel expects DropdownPanelFocusable interface on views passed to dropdown panel. See #30.
// The method should be implemented while working on keyboard support for this view. See #22.
}

/**
* Highlights grid boxes depending on rows & columns selected.
*
Expand Down
5 changes: 5 additions & 0 deletions tests/ui/inserttableview.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ describe( 'InsertTableView', () => {
expect( view.items ).to.have.length( 100 );
} );

it( 'should not throw error for DropdownPanelFocusable interface methods', () => {
expect( () => view.focus() ).to.not.throw();
expect( () => view.focusLast() ).to.not.throw();
} );

describe( 'view#items bindings', () => {
it( 'updates view#height & view#width on "over" event', () => {
const boxView = view.items.get( 0 );
Expand Down

0 comments on commit fd8b1b8

Please sign in to comment.