preventDefault() for link popup 'Cancel'. props ocean90, SergeyBiryukov, fixes #19369.

git-svn-id: http://svn.automattic.com/wordpress/trunk@19460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-11-28 16:37:46 +00:00
parent 90f4fb3dd5
commit 72b44daa02
3 changed files with 7 additions and 4 deletions

View File

@ -31,10 +31,13 @@ var wpLink;
inputs.dialog.keydown( wpLink.keydown );
inputs.dialog.keyup( wpLink.keyup );
inputs.submit.click( function(e){
wpLink.update();
e.preventDefault();
wpLink.update();
});
$('#wp-link-cancel').click( function(e){
e.preventDefault();
wpLink.close();
});
$('#wp-link-cancel').click( wpLink.close );
$('#internal-toggle').click( wpLink.toggleInternalLinking );
rivers.elements.bind('river-select', wpLink.updateFields );

File diff suppressed because one or more lines are too long

View File

@ -262,7 +262,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", false, '20111127', 1 );
$scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'jquery', 'wpdialogs' ), '20110929', 1 );
$scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'jquery', 'wpdialogs' ), '20111128', 1 );
$scripts->localize( 'wplink', 'wpLinkL10n', array(
'title' => __('Insert/edit link'),
'update' => __('Update'),