Skip to content

Commit

Permalink
Merge pull request #864 from matuzalemsteles/pr-3
Browse files Browse the repository at this point in the history
#858 getChildren is not filtering 'a'
  • Loading branch information
jbalsas authored Jun 25, 2018
2 parents 4e8e54e + 2caf44b commit d3c3794
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/core/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,17 @@
}

if (selectedElement && CKEDITOR.env.ie) {
return selectedElement.getChildren('a').getItem(0);
var children = selectedElement.getChildren();

var count = children.count();

for (var i = 0 ; i < count ; i++) {
var node = children.getItem(i);

if (node.is('a')) {
return node;
}
}
}

var range = selection.getRanges()[0];
Expand Down

0 comments on commit d3c3794

Please sign in to comment.