Editor: Remove target=_blank when unchecked in the link modal.

Fixes #39276 for trunk.



git-svn-id: https://develop.svn.wordpress.org/trunk@39601 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ella van Dorpe 2016-12-14 20:30:00 +00:00
parent ca92da24da
commit 79ded07a1a
1 changed files with 3 additions and 8 deletions

View File

@ -302,15 +302,10 @@ var wpLink;
getAttrs: function() {
wpLink.correctURL();
var attrs = {
href: $.trim( inputs.url.val() )
return {
href: $.trim( inputs.url.val() ),
target: inputs.openInNewTab.prop( 'checked' ) ? '_blank' : null
};
if ( inputs.openInNewTab.prop( 'checked' ) ) {
attrs.target = '_blank';
}
return attrs;
},
buildHtml: function(attrs) {