From 2a30146900e191df2478924c4d05afa9000ba81b Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Sat, 12 Mar 2016 19:41:00 +0000 Subject: [PATCH] TinyMCE, inline link: when searching, do not empty the URL input field when using the arrow keys to highlight items. Props afercia. See #33301. git-svn-id: https://develop.svn.wordpress.org/trunk@36974 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/tinymce/plugins/wplink/plugin.js | 1 + src/wp-includes/js/wplink.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/wp-includes/js/tinymce/plugins/wplink/plugin.js b/src/wp-includes/js/tinymce/plugins/wplink/plugin.js index f2a9432ab8..0083c1b28d 100644 --- a/src/wp-includes/js/tinymce/plugins/wplink/plugin.js +++ b/src/wp-includes/js/tinymce/plugins/wplink/plugin.js @@ -348,6 +348,7 @@ }, focus: function( event, ui ) { $input.attr( 'aria-activedescendant', 'mce-wp-autocomplete-' + ui.item.ID ); + event.preventDefault(); }, select: function( event, ui ) { $input.val( ui.item.permalink ); diff --git a/src/wp-includes/js/wplink.js b/src/wp-includes/js/wplink.js index d541f26086..27505b81d4 100644 --- a/src/wp-includes/js/wplink.js +++ b/src/wp-includes/js/wplink.js @@ -76,6 +76,7 @@ var wpLink; }, focus: function( event, ui ) { $input.attr( 'aria-activedescendant', 'mce-wp-autocomplete-' + ui.item.ID ); + event.preventDefault(); }, select: function( event, ui ) { $input.val( ui.item.permalink );