Skip to content

Commit

Permalink
EZP-24240: Make sure the custom temporary class is not added back on …
Browse files Browse the repository at this point in the history
…links
  • Loading branch information
dpobel committed Jun 26, 2015
1 parent 07f2b91 commit 99c79ec
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -212,15 +212,17 @@ var eZOEPopupUtils = {
}
else if ( s.tagName === 'link' )
{
var links, linkClass = 'ezoeInsertedLink';
var links, linkClass = 'ezoeInsertedLink', origClass;

origClass = args['class'];
args['class'] = args['class'] ? args['class'] + " " + linkClass : linkClass;
ed.execCommand('mceInsertLink', false, args, {skip_undo : 1} );
links = ed.dom.select('.' + linkClass);
tinymce.each(links, function (link) {
ed.dom.removeClass(link, linkClass);
});
s.editorElement = links[0];
args['class'] = origClass;

// fixup if we are inside embed tag
if ( tmp = eZOEPopupUtils.getParentByTag( s.editorElement, 'div,span', 'ezoeItemNonEditable' ) )
Expand Down

0 comments on commit 99c79ec

Please sign in to comment.