Bug 892275 - F2 should make the selected node and its children editable as html; r=mratcliffe
This commit is contained in:
@@ -60,6 +60,7 @@ function HTMLEditor(htmlDocument)
|
||||
};
|
||||
|
||||
config.extraKeys[ctrl("Enter")] = this.hide;
|
||||
config.extraKeys["F2"] = this.hide;
|
||||
config.extraKeys["Esc"] = this.hide.bind(this, false);
|
||||
|
||||
this.container.addEventListener("click", this.hide, false);
|
||||
@@ -140,6 +141,8 @@ HTMLEditor.prototype = {
|
||||
|
||||
this.editor.refresh();
|
||||
this.editor.focus();
|
||||
|
||||
this.emit("popupshown");
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -161,9 +164,9 @@ HTMLEditor.prototype = {
|
||||
let newValue = this.editor.getText();
|
||||
let valueHasChanged = this._originalValue !== newValue;
|
||||
let preventCommit = shouldCommit === false || !valueHasChanged;
|
||||
this.emit("popup-hidden", !preventCommit, newValue);
|
||||
this._originalValue = undefined;
|
||||
this._visible = undefined;
|
||||
this.emit("popuphidden", !preventCommit, newValue);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user