Skip to content

Commit

Permalink
Resizable Editor: Make the editor resizable with arrow keys (WordPres…
Browse files Browse the repository at this point in the history
…s#65546)

Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: kevin940726 <kevin940726@git.wordpress.org>
  • 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.