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

Commit

Permalink
Fix: Esc should close the link panel even if none of the fields is fo…
Browse files Browse the repository at this point in the history
…cused. Closes #90.
  • Loading branch information
oleq committed Apr 21, 2017
1 parent 686e625 commit 20e451f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ui/linkformview.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ export default class LinkFormView extends View {
attributes: {
class: [
'ck-link-form',
]
],

// https://github.com/ckeditor/ckeditor5-link/issues/90
tabindex: '-1'
},

children: [
Expand Down
1 change: 1 addition & 0 deletions tests/ui/linkformview.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ describe( 'LinkFormView', () => {
describe( 'constructor()', () => {
it( 'should create element from template', () => {
expect( view.element.classList.contains( 'ck-link-form' ) ).to.true;
expect( view.element.getAttribute( 'tabindex' ) ).to.equal( '-1' );
} );

it( 'should create child views', () => {
Expand Down
5 changes: 5 additions & 0 deletions theme/components/linkform.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
padding: ck-spacing( 'large' );
overflow: hidden;

&:focus {
// https://github.com/ckeditor/ckeditor5-link/issues/90
outline: none;
}

.ck-label {
margin-bottom: ck-spacing( 'small' );
}
Expand Down

0 comments on commit 20e451f

Please sign in to comment.