Skip to content

Commit

Permalink
Only focus dropdown button once if 'esc' or 'arrowleft' is used.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dumluregn committed Jul 28, 2022
1 parent 5148559 commit 3fd1f22
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/ckeditor5-ui/src/dropdown/dropdownview.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export default class DropdownView extends View {
this.on( 'change:isOpen', () => {
if ( !this.isOpen ) {
// If the dropdown was closed, move the focus back to the button (#12125).
this.buttonView.focus();
this.focus();

return;
}
Expand All @@ -280,7 +280,6 @@ export default class DropdownView extends View {

const closeDropdown = ( data, cancel ) => {
if ( this.isOpen ) {
this.buttonView.focus();
this.isOpen = false;
cancel();
}
Expand Down

0 comments on commit 3fd1f22

Please sign in to comment.