Bug 866507: Style Inspector: open URLs in new tab r=mratcliffe

This commit is contained in:
Brian Grinstead 2013-04-29 17:12:47 -05:00
parent 71c7b4f103
commit 600ba060ec

View File

@ -1324,6 +1324,7 @@ function TextPropertyEditor(aRuleEditor, aProperty)
this.doc = aRuleEditor.doc;
this.prop = aProperty;
this.prop.editor = this;
this.browserWindow = this.doc.defaultView.top;
let sheet = this.prop.rule.sheet;
let href = sheet ? CssLogic.href(sheet) : null;
@ -1520,9 +1521,14 @@ TextPropertyEditor.prototype = {
href: this.resolveURI(resourceURI)
});
a.addEventListener("click", function(aEvent) {
a.addEventListener("click", (aEvent) => {
// Clicks within the link shouldn't trigger editing.
aEvent.stopPropagation();
aEvent.preventDefault();
this.browserWindow.openUILinkIn(aEvent.target.href, "tab");
}, false);
appendText(this.valueSpan, val.split(resourceURI)[1]);