Skip to content

Commit

Permalink
Simplifying condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
beatadelura committed Jul 17, 2017
1 parent ac6a1af commit 79e4960
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/link/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
// If the link has descendants and the last part of it is also a part of a word partially
// unlinked, clicked element may be a descendant of the link, not the link itself (http://dev.ckeditor.com/ticket/11956).
// The evt.data.element.getAscendant( 'img', 1 ) condition allows opening anchor dialog if the anchor is empty (#501).
var element = evt.data.element.getAscendant( 'a', 1 ) || evt.data.element.getAscendant( 'img', 1 );
var element = evt.data.element.getAscendant( { a: 1, img: 1 }, true );

if ( element && !element.isReadOnly() ) {
if ( element.is( 'a' ) ) {
Expand Down

0 comments on commit 79e4960

Please sign in to comment.