mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-08 17:38:26 +01:00
Editor: remove wpLink dependency on jQuery UI.
Props afercia. Fixes #34716. Built from https://develop.svn.wordpress.org/trunk@35728 git-svn-id: http://core.svn.wordpress.org/trunk@35692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
91759029e9
commit
50a5fbb269
@ -459,13 +459,14 @@ var wpLink;
|
||||
},
|
||||
|
||||
keydown: function( event ) {
|
||||
var fn, id,
|
||||
key = $.ui.keyCode;
|
||||
var fn, id;
|
||||
|
||||
if ( key.ESCAPE === event.keyCode ) {
|
||||
// Escape key.
|
||||
if ( 27 === event.keyCode ) {
|
||||
wpLink.close();
|
||||
event.stopImmediatePropagation();
|
||||
} else if ( key.TAB === event.keyCode ) {
|
||||
// Tab key.
|
||||
} else if ( 9 === event.keyCode ) {
|
||||
id = event.target.id;
|
||||
|
||||
// wp-link-submit must always be the last focusable element in the dialog.
|
||||
@ -479,7 +480,8 @@ var wpLink;
|
||||
}
|
||||
}
|
||||
|
||||
if ( event.keyCode !== key.UP && event.keyCode !== key.DOWN ) {
|
||||
// Up Arrow and Down Arrow keys.
|
||||
if ( 38 !== event.keyCode && 40 !== event.keyCode ) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -488,7 +490,8 @@ var wpLink;
|
||||
return;
|
||||
}
|
||||
|
||||
fn = event.keyCode === key.UP ? 'prev' : 'next';
|
||||
// Up Arrow key.
|
||||
fn = 38 === event.keyCode ? 'prev' : 'next';
|
||||
clearInterval( wpLink.keyInterval );
|
||||
wpLink[ fn ]();
|
||||
wpLink.keyInterval = setInterval( wpLink[ fn ], wpLink.keySensitivity );
|
||||
@ -496,9 +499,8 @@ var wpLink;
|
||||
},
|
||||
|
||||
keyup: function( event ) {
|
||||
var key = $.ui.keyCode;
|
||||
|
||||
if ( event.which === key.UP || event.which === key.DOWN ) {
|
||||
// Up Arrow and Down Arrow keys.
|
||||
if ( 38 === event.keyCode || 40 === event.keyCode ) {
|
||||
clearInterval( wpLink.keyInterval );
|
||||
event.preventDefault();
|
||||
}
|
||||
|
2
wp-includes/js/wplink.min.js
vendored
2
wp-includes/js/wplink.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-beta4-35727';
|
||||
$wp_version = '4.4-beta4-35728';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user