Skip to content

Commit

Permalink
Workaround for Firefox/Safari button focus issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZebulanStanphill committed May 24, 2020
1 parent 53fd676 commit a87fc5d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/block-library/src/heading/heading-level-dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ export default function HeadingLevelDropdown( { selectedLevel, onChange } ) {
onClick() {
onChange( targetLevel );
},
// Temporary workaround for macOS Firefox/Safari issue
// where clicking buttons in the heading level toolbar
// doesn't work.
// TODO: Replace this with a more general solution.
// https://github.com/WordPress/gutenberg/pull/20246#pullrequestreview-417338057
onMouseDown( event ) {
event.preventDefault();
event.currentTarget.focus();
},
};
} ) }
/>
Expand Down

0 comments on commit a87fc5d

Please sign in to comment.