Bug 988001 - Make the popup click to insert work again, r=bgrin

This commit is contained in:
Girish Sharma 2014-04-19 15:43:26 +05:30
Родитель 724e36869a
Коммит 549b3b1a37
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -783,7 +783,7 @@ InplaceEditor.prototype = {
_onBlur: function InplaceEditor_onBlur(aEvent, aDoNotClear)
{
if (aEvent && this.popup && this.popup.isOpen &&
this.contentType == CONTENT_TYPES.CSS_MIXED) {
this.popup.selectedIndex >= 0) {
let label, preLabel;
if (this._selectedIndex === undefined) {
({label, preLabel}) = this.popup.getItemAtIndex(this.popup.selectedIndex);
@ -819,6 +819,11 @@ InplaceEditor.prototype = {
};
this.popup._panel.addEventListener("popuphidden", onPopupHidden);
this.popup.hidePopup();
// Content type other than CSS_MIXED is used in rule-view where the values
// are live previewed. So we apply the value before returning.
if (this.contentType != CONTENT_TYPES.CSS_MIXED) {
this._apply();
}
return;
}
this._apply();

Просмотреть файл

@ -1998,7 +1998,8 @@ TextPropertyEditor.prototype = {
get editing() {
return !!(this.nameSpan.inplaceEditor || this.valueSpan.inplaceEditor ||
this.ruleEditor.ruleView.colorPicker.tooltip.isShown() ||
this.ruleEditor.ruleView.colorPicker.eyedropperOpen);
this.ruleEditor.ruleView.colorPicker.eyedropperOpen) ||
this.popup.isOpen;
},
/**