From c77d6c27c395a327c3725c5801b12d47ca18a496 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Thu, 6 Jun 2013 16:49:25 +0000 Subject: [PATCH] Properly uncheck the "new tab" box when editing a non-new-tab link. Previously, if you had just edited a new-tab link, a subsequent edit of a non-new-tab link would mistakenly keep the checkbox checked. props sc0ttkclark. fixes #24520. git-svn-id: https://develop.svn.wordpress.org/trunk@24419 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/js/wplink.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wp-includes/js/wplink.js b/wp-includes/js/wplink.js index ee085ff15f..232fd4e2f9 100644 --- a/wp-includes/js/wplink.js +++ b/wp-includes/js/wplink.js @@ -113,8 +113,7 @@ var wpLink; inputs.url.val( ed.dom.getAttrib(e, 'href') ); inputs.title.val( ed.dom.getAttrib(e, 'title') ); // Set open in new tab. - if ( "_blank" == ed.dom.getAttrib(e, 'target') ) - inputs.openInNewTab.prop('checked', true); + inputs.openInNewTab.prop('checked', ( "_blank" == ed.dom.getAttrib( e, 'target' ) ) ); // Update save prompt. inputs.submit.val( wpLinkL10n.update );