Bug 977043 - Prevent markupview from breaking selection. r=jwalker

This commit is contained in:
Alexandre Poirot 2014-03-22 09:02:14 +01:00
parent b379cc00cc
commit 8d5203ac2b

View File

@ -299,6 +299,9 @@ MarkupView.prototype = {
this.markNodeAsSelected(selection.nodeFront);
}
done();
}, (e) => {
console.error(e);
done();
});
} else {
this.unmarkSelectedNode();
@ -863,8 +866,10 @@ MarkupView.prototype = {
let parent = node.parentNode();
if (!container.elt.parentNode) {
let parentContainer = this._containers.get(parent);
parentContainer.childrenDirty = true;
this._updateChildren(parentContainer, {expand: node});
if (parentContainer) {
parentContainer.childrenDirty = true;
this._updateChildren(parentContainer, {expand: node});
}
}
node = parent;