Skip to content

Commit

Permalink
Resizable Editor: Make the editor resizable with arrow keys (#65546)
Browse files Browse the repository at this point in the history
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: kevin940726 <[email protected]>
  • Loading branch information
3 people authored Sep 24, 2024
1 parent 82dff13 commit 228ab3a
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ export default function ResizeHandle( { direction, resizeWidthBy } ) {
function handleKeyDown( event ) {
const { keyCode } = event;

if ( keyCode !== LEFT && keyCode !== RIGHT ) {
return;
}
event.preventDefault();

if (
( direction === 'left' && keyCode === LEFT ) ||
( direction === 'right' && keyCode === RIGHT )
Expand Down

0 comments on commit 228ab3a

Please sign in to comment.