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

Commit 713ac46

Browse files
authored
Merge pull request #41 from ckeditor/t/40
Fix: Navigating into the table insertion panel using the keyboard should not throw an error. Closes #30.
2 parents db1cd82 + d05db3c commit 713ac46

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/ui/inserttableview.js

+17
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import './../../theme/inserttable.css';
1717
* It renders a 10x10 grid to choose inserted table size.
1818
*
1919
* @extends module:ui/view~View
20+
* @implements module:ui/dropdown/dropdownpanelfocusable~DropdownPanelFocusable
2021
*/
2122
export default class InsertTableView extends View {
2223
/**
@@ -125,6 +126,22 @@ export default class InsertTableView extends View {
125126
} );
126127
}
127128

129+
/**
130+
* @inheritDoc
131+
*/
132+
focus() {
133+
// The dropdown panel expects DropdownPanelFocusable interface on views passed to dropdown panel. See #30.
134+
// The method should be implemented while working on keyboard support for this view. See #22.
135+
}
136+
137+
/**
138+
* @inheritDoc
139+
*/
140+
focusLast() {
141+
// The dropdown panel expects DropdownPanelFocusable interface on views passed to dropdown panel. See #30.
142+
// The method should be implemented while working on keyboard support for this view. See #22.
143+
}
144+
128145
/**
129146
* Highlights grid boxes depending on rows & columns selected.
130147
*

tests/ui/inserttableview.js

+5
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ describe( 'InsertTableView', () => {
5454
expect( view.items ).to.have.length( 100 );
5555
} );
5656

57+
it( 'should not throw error for DropdownPanelFocusable interface methods', () => {
58+
expect( () => view.focus() ).to.not.throw();
59+
expect( () => view.focusLast() ).to.not.throw();
60+
} );
61+
5762
describe( 'view#items bindings', () => {
5863
it( 'updates view#height & view#width on "over" event', () => {
5964
const boxView = view.items.get( 0 );

0 commit comments

Comments
 (0)