Fixed bug where empty anchor elements would appear after deleting links

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1884 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2010-12-15 19:42:48 +00:00
parent 2ef4f9fa3c
commit 10519d9a0c
1 changed files with 8 additions and 0 deletions

View File

@ -8876,8 +8876,16 @@ this.deleteSelectedElements = function() {
var parent = selected.parentNode;
var t = selected;
// this will unselect the element and remove the selectedOutline
selectorManager.releaseSelector(t);
// Get the parent if it's a single-child anchor
if(parent.tagName === 'a' && parent.childNodes.length === 1) {
t = parent;
parent = parent.parentNode;
}
var nextSibling = t.nextSibling;
var elem = parent.removeChild(t);
selectedCopy.push(selected); //for the copy