Skip to content

Commit c3cd432

Browse files
author
nacin
committed
preventDefault() for link popup 'Cancel'. props ocean90, SergeyBiryukov, fixes #19369.
git-svn-id: http://core.svn.wordpress.org/trunk@19460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent 955bd9e commit c3cd432

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

wp-includes/js/wplink.dev.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,13 @@ var wpLink;
3131
inputs.dialog.keydown( wpLink.keydown );
3232
inputs.dialog.keyup( wpLink.keyup );
3333
inputs.submit.click( function(e){
34+
e.preventDefault();
3435
wpLink.update();
36+
});
37+
$('#wp-link-cancel').click( function(e){
3538
e.preventDefault();
39+
wpLink.close();
3640
});
37-
$('#wp-link-cancel').click( wpLink.close );
3841
$('#internal-toggle').click( wpLink.toggleInternalLinking );
3942

4043
rivers.elements.bind('river-select', wpLink.updateFields );

wp-includes/js/wplink.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wp-includes/script-loader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ function wp_default_scripts( &$scripts ) {
262262

263263
$scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", false, '20111127', 1 );
264264

265-
$scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'jquery', 'wpdialogs' ), '20110929', 1 );
265+
$scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'jquery', 'wpdialogs' ), '20111128', 1 );
266266
$scripts->localize( 'wplink', 'wpLinkL10n', array(
267267
'title' => __('Insert/edit link'),
268268
'update' => __('Update'),

0 commit comments

Comments
 (0)