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

Fix: Error thrown when navigating into the table insertion panel using the keyboard. #41

Merged
merged 2 commits into from
Jun 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -125,6 +126,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