Skip to content

Commit

Permalink
Accessibility: Insert Link modal: Improve keyboard interaction.
Browse files Browse the repository at this point in the history
Avoids change the selected link when using the Shift + Up/Down arrow keys
to select text in the form fields.

Props afercia.

Merges [42807] to the 5.0 branch.
Fixes #43253.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@44405 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
desrosj committed Jan 6, 2019
1 parent 2acbb2a commit 3f6df95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-includes/js/wplink.js
Expand Up @@ -559,7 +559,7 @@ var wpLink;
}

// Up Arrow and Down Arrow keys.
if ( 38 !== event.keyCode && 40 !== event.keyCode ) {
if ( event.shiftKey || ( 38 !== event.keyCode && 40 !== event.keyCode ) ) {
return;
}

Expand Down

0 comments on commit 3f6df95

Please sign in to comment.